newbie here!! learning how code using xcode 4.2. wanted create app based on button name in uitableviewcell bring .png file. have list of colors, animals, household objects , wanted image display based on button pressed. have 300 images , want image tiger.png display when "tiger" button pressed. images full screen won't fit on same view controller (i got working smaller images need display full screen image). appreciated. thank you!
aspect of oop, need create en nsobject, contain each "animal".
can assign property's name, imagename, sound, description, whatever want.
, instead of showing strings in tableview, show nsstring property of "animal" object.
otherwise there several hack n slashes it.
1 example, top of hat, should try make work
code:
- (ibaction) clickedthisbutton:(id)sender { uibutton *buttonclicked = (uibutton*)sender; pointertonextcontroller.bigimage = [nsstring stringwithformat:@"image_%@", buttonclicked.titlelabel]; /* push here */ } this very dirty, present solutions possible
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment