-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Country selector #7
base: master
Are you sure you want to change the base?
Country selector #7
Conversation
As PushRow<String> in order to allow country selection instead of a textField
This allows us to initialize an empty object of the PostalAddressType used - instead of the non-generic implementation. We also made sure the onChange event is only fired once - and not multiple times (this was the case if the PostalAddress value was not initialized before).
Because the onChange event of the PushRow was not fired, the child cell was never reloaded and therefore displayed a wrong state.
Still waiting for a new tagged release though
Any chance we can get this merged? |
@@ -1 +1 @@ | |||
github "xmartlabs/Eureka" ~> 4.0 | |||
github "xmartlabs/Eureka" "master" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use 4.1 now
|
||
+++ Section() | ||
<<< MyPostalAddressRow() { | ||
$0.streetPlaceholder = "Street" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you align this line to its context? Maybe if you set Xcode to replace tabs with spaces
@IBOutlet weak var postalPercentageConstraint: NSLayoutConstraint? | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove trailing whitespace
@@ -61,6 +66,8 @@ open class _PostalAddressCell<T: PostalAddressType>: Cell<T>, CellType, PostalAd | |||
cityTextField?.removeTarget(self, action: nil, for: .allEvents) | |||
countryTextField?.delegate = nil | |||
countryTextField?.removeTarget(self, action: nil, for: .allEvents) | |||
countrySelectorTableView?.delegate = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here for indentation.
Hi @marbetschar, sorry for the late reply. Why did you use a UITableView with a PushRow instead or a simple button that pushes a SelectorViewController? |
@mats-claassen main idea was to provide a way for further customization, using native Eureka features .... but looking back it might not made too much sense probably...? |
This pull request adds the ability to define a country selector using the newly added
var countrySelectorRow : PushRow<String>?
as discussed in #3.To make use of this you'll define a
PostalAddressRow
like this (see the Example project):If you want to use custom Nibs, you'll have to add a
UITableView
linked with@IBOutlet open var countrySelectorTableView: UITableView?
.And this is how it looks like: