From b86a43c3eb39854b156d0d48f24d1c436f3f90a7 Mon Sep 17 00:00:00 2001 From: Janne Salenius Date: Mon, 24 Jun 2019 22:49:47 +0200 Subject: [PATCH 1/2] Readme swift example update to Swift 5 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 86d5c4a..cd19f3c 100644 --- a/README.md +++ b/README.md @@ -39,10 +39,10 @@ override func viewDidLoad() { super.viewDidLoad() // Add the controller and view. let tagController = PARTagPickerViewController() - addChildViewController(tagController) + addChild(tagController) tagController.view.frame = CGRect(x: 0, y: 64, width: view.bounds.width, height: COLLECTION_VIEW_HEIGHT) view.addSubview(tagController.view) - tagController.didMove(toParentViewController: self) + tagController.didMove(toParent: self) // Customize appearance and data. tagController.delegate = self @@ -50,7 +50,7 @@ override func viewDidLoad() { tagController.chosenTags = ["with a fox", "in a box", "anywhere"] tagController.allowsNewTags = true tagController.view.backgroundColor = .orange - let colors = PARTagColorReference() + let colors = PARTagColorReference()! colors.highlightedTagTextColor = .white colors.highlightedTagBackgroundColor = .blue tagController.tagColorRef = colors From 89316293f2b3459cb68b00cb189c68e6fd922dac Mon Sep 17 00:00:00 2001 From: Janne Salenius Date: Fri, 28 Jun 2019 16:24:09 +0200 Subject: [PATCH 2/2] More height to the picker --- PARTagPicker/Classes/PARTagPickerViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PARTagPicker/Classes/PARTagPickerViewController.m b/PARTagPicker/Classes/PARTagPickerViewController.m index cc4ecfe..045381e 100644 --- a/PARTagPicker/Classes/PARTagPickerViewController.m +++ b/PARTagPicker/Classes/PARTagPickerViewController.m @@ -14,7 +14,7 @@ #import "PARTagColorReference.h" #import "UIView+NibInitable.h" -CGFloat const COLLECTION_VIEW_HEIGHT = 39.0; +CGFloat const COLLECTION_VIEW_HEIGHT = 44.0; static CGFloat const TAGCOLLECTION_CELL_HEIGHT = 27.0; static CGFloat const TAG_TEXTFIELD_MAXWIDTH = 150; static NSString * const PARTagCollectionViewCellIdentifier = @"PARTagCollectionViewCellIdentifier";