Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 3, 2009, 05:21 AM   #1
estupefactika
macrumors member
 
Join Date: Feb 2009
Location: Alcobendas (Madrid)
tabBarController, clicking an item a second time

Hi, I have a tabBarController. Each item has a ViewController. It works fine, the problem is when I click an item a second time. In the first time it load methods, I update any thing, etc... but a second time it doesnt do nothing, I would like to update some data but it doesnt load methods again

Is there any way to solve it? Thanks
estupefactika is offline   0 Reply With Quote
Old Mar 3, 2009, 03:03 PM   #2
iphonedevelop18
macrumors member
 
Join Date: Feb 2009
I believe this could be fixed by making all the tab bars under 1 view controller
iphonedevelop18 is offline   0 Reply With Quote
Old Mar 3, 2009, 03:05 PM   #3
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by estupefactika View Post
It works fine, the problem is when I click an item a second time.
Let me get this straight: you are clicking a tab bar item that is already selected, correct?
dejo is offline   0 Reply With Quote
Old Mar 3, 2009, 05:08 PM   #4
estupefactika
Thread Starter
macrumors member
 
Join Date: Feb 2009
Location: Alcobendas (Madrid)
Quote:
Originally Posted by dejo View Post
Let me get this straight: you are clicking a tab bar item that is already selected, correct?
No, it has already been selected previously.
All my tab bar item use the same ViewController, depending what is clicked, it display one or other things.

Example:
- I click in tab bar item 1, it display me a table. Correct.
- I click in tab bar item 2, it does the same, correct.
- Now, in tab bar item 2 I update all data clicking a UIButton, it display me the table updated, correct. But If I come back to tab bar item 1, it contains the old table not updated, I need reload it. I think is because the view has already been loaded previously. I would need to reload it again. It is possible?
estupefactika is offline   0 Reply With Quote
Old Mar 3, 2009, 05:14 PM   #5
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by estupefactika View Post
It is possible?
It is. Look into the setNeedsDisplay instance method of UIView or the reloadData instance method of UITableView.
dejo is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Pages: Does the "Browse All Versions" menu item use Time Machine? moonman239 Mac Applications and Mac App Store 1 Apr 8, 2014 05:35 PM
Item not available PegM4 iPad Tips, Help and Troubleshooting 3 Oct 23, 2013 04:32 PM
Clicking on the last item in a list in Finder, when scroll bars get in the way bwphoto OS X 4 Mar 7, 2013 09:23 PM
Adobe Illustrator excluding item from Time Machine? andy.barron Mac Applications and Mac App Store 0 Mar 4, 2013 07:38 AM

Forum Jump

All times are GMT -5. The time now is 03:17 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC