objective c - Xcode 6.2 iOS target 6.1: self.view endEditing:YES throws exception unrecognized selector sent to instance -
i have textfield
pulls decimal pad keyboard. added tap gesture recognizer in .xib
, want close keyboard when taps on screen.
@property (weak, nonatomic) iboutlet uitextfield *billtextfield; - (ibaction)ontap:(id)sender; @end @implementation tipviewcontroller - (ibaction)ontap:(id)sender { self.title = @"tap detected"; [self.view endediting:yes]; } @end
this throws following exception:
[tipviewcontroller billtextfield:]: unrecognized selector sent instance 0x7fd6dac50630 2015-03-28 22:19:59.747 tipcalculator[32959:3666939] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[tipviewcontroller billtextfield:]: unrecognized selector sent instance 0x7fd6dac50630'
what missing here?
Comments
Post a Comment