objective c - How to make a UITextView not take the focus when initializing? -
objective c - How to make a UITextView not take the focus when initializing? -
i'm using code create detailed view pushed when press row of uitableview, theres problem.
the detailed view contain uitextview , when detailedview called (only first time) create uitableview row pressed lose pressed state. shouldn't ! should lose pressed state when returning detailed view list view.
as remove uitextview code, no problem !
i think it's uitextview taking focus?
is there way avoid ? subclassing or such?
hmmm not seeing in sandbox wrote.
created simple navigation-based project. added view controller project xib; added uitextfield xib. made next code changes root view controller:
- (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { homecoming 1; }in cellforrowatindexpath:
cell.text = @"push me"; in didselectrowatindexpath:
simpleviewcontroller *detailviewcontroller = [[simpleviewcontroller alloc] initwithnibname:@"simpleview" bundle:nil]; in viewdidload:
self.navigationitem.title = @"home"; selecting "push me" row highlights row , pushes simpleviewcontroller onto stack. selecting "home" button pops view off stack, returning table view , deselecting/un-highlighting selected row. true whether or not textfield in simpleviewcontroller first responder @ time of navigation.
objective-c cocoa-touch uitableview uikit uitextfield
Comments
Post a Comment