iphone - how to properly show / hide UIView on button click in iOS -


i have uiview, added in xib file. through connection inspector join properly.

in viewdidload: method hiding , on button pressed showing it.

here code far:

.h file

@property (nonatomic, retain) iboutlet uiview   *subview; 

in viewdidload: method:

_subview.hidden = yes; 

it hiding view properly, on button pressed not showing up.

- (ibaction)customerinvoice:(id)sender { //self->_subview.hidden = no; _subview.hidden = no; } 

using both ways not showing up. please, me resolve it.

sometime (or xcode) can make mistake during connecting iboutlets/ibaction if doesn't work can remove connection , again, should help.

also apple recommendation use weak instead of strong/retain iboutlet property if haven't got reason should do:

@property (nonatomic, weak) iboutlet uiview *subview; 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -