Skip to content

Commit b62b9c0

Browse files
samsymonsajsecord
authored andcommitted
[Ink] Add nonnull to the MDCInkTouchController initializer (#1123)
* Specify `nonnull` on the MDCInkTouchController initializer. This is a quick change since the initializer was never returning nil to begin with. * Update Shrine to use the nonnull MDCInkTouchController initializer.
1 parent 0efb553 commit b62b9c0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

catalog/MDCCatalog/MDCCatalogComponentsController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class MDCCatalogComponentsController: UICollectionViewController, MDCInkTouchCon
7171
override func viewDidLoad() {
7272
super.viewDidLoad()
7373

74-
inkController = MDCInkTouchController(view: self.collectionView!)!
74+
inkController = MDCInkTouchController(view: self.collectionView!)
7575
inkController!.addInkView()
7676
inkController!.delaysInkSpread = true
7777
inkController!.delegate = self

components/Ink/src/MDCInkTouchController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
8282
@param view View that responds to touch events for ink.
8383
*/
84-
- (nullable instancetype)initWithView:(nonnull UIView *)view NS_DESIGNATED_INITIALIZER;
84+
- (nonnull instancetype)initWithView:(nonnull UIView *)view NS_DESIGNATED_INITIALIZER;
8585

8686
/**
8787
When called the @c defaultInkView is added to the @c view.

demos/Shrine/Shrine/ShrineInkOverlay.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ShrineInkOverlay: UIView, MDCInkTouchControllerDelegate {
2424
override init(frame: CGRect) {
2525
super.init(frame: frame)
2626
let cyan = UIColor(red: 22 / 255, green: 240 / 255, blue: 240 / 255, alpha: 0.2)
27-
self.inkTouchController = MDCInkTouchController(view:self)!
27+
self.inkTouchController = MDCInkTouchController(view:self)
2828
self.inkTouchController!.defaultInkView.inkColor = cyan
2929
self.inkTouchController!.addInkView()
3030
self.inkTouchController!.delegate = self

0 commit comments

Comments
 (0)