Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-14-2010, 08:02 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 5
Default pushViewController phenomenon / Help appreciated

Hi there,

I got the following problem.

The setup: A TabBar view controller. In one of its views a UITabViewController. The table shows items which may be further accessed by an accessory button (the white-on-blue-arrow circles):

Code:
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
	[[self navigationController] pushViewController:[[anotherViewController alloc] init]  animated:YES];
}
Everything works fine as long as the table related tab is not shown in the tab bar itself: If I access the table through the three dots tab (the more tabs button) and its related tab wihtin the expanded list everything works fine. As soon as I edit the tab bar and pull the tab down in the tab bar itself the accessory buttons will not work.

And ideas, help appreciated!
Thank you

Last edited by Gooze_____; 03-14-2010 at 08:05 PM.
Gooze_____ is offline   Reply With Quote
Old 03-15-2010, 08:42 AM   #2 (permalink)
Emphasizing Fundamentals
 
BrianSlick's Avatar
 
Join Date: Jul 2009
Location: NoVA / DC Area
Age: 36
Posts: 7,129
Default

I'm guessing you don't actually have a navigation controller in place. You're picking one up for free from the More tab because it already has one. Outside of the more tab, you need to add your own, otherwise this code doesn't do anything.

And if you use this exact code, you will leak your view controller.
__________________
BriTer Ideas LLC - Code review, consulting, development. PM for pricing.

SlickShopper 2 | Free NSLog utility | Leave a PayPal donation.

Are you a newbie? Things you should read:
BrianSlick is offline   Reply With Quote
Reply

Bookmarks

Tags
tableview, uitabbar, uitableview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 240
14 members and 226 guests
ADY, AragornSG, Dani77, Dattee, Duncan C, HDshot, HemiMG, Promo Dispenser, Punkjumper, Rudy, sacha1996, sneaky, spiderguy84, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,231
Posts: 380,768
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:17 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0