Open alvaromorales opened 11 years ago
Nice work! Your implementation works, but it's not very semantic because the meaning of 0 or 1 is not very clear, nor is the tag property.
You can use the same logic you already have, but instead of using tag, you could have a property like:
@property (nonatomic, weak) UITextField *activeTextField;
and change your method to:
- (void)changeCurrentUnit {
if ([self.cTextField isFirstResponder]) {
self.activeTextField = self.cTextField;
} else {
self.activeTextField = self.fTextField;
}
}
My app is complete, please review. Not sure that this is the right way to indicate which textfield was selected, it feels a bit hacked /cc @nesquena @timothy1ee