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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 08-07-2010, 06:15 PM   #1 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 651
kapps11 is on a distinguished road
Default Add View Below TableView

Hey guys -

So Im working a new app that has a tableview, and I want to do something kinda like what the apple voicemail app does, so when you click on a cell, it is persistently selected, and then a little view pops up on the bottom. Ive attached an image of what I mean using apple's voicemail app as an example. And i cat figure out what the best way to do that would be - modal view controllers, a subview of the tableviewcontroller, etc. Help is appreciated!

Thx

kapps11 is offline   Reply With Quote
Old 08-07-2010, 06:22 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,050
wuf810 is on a distinguished road
Default

Quote:
Originally Posted by kapps11 View Post
Hey guys -

So Im working a new app that has a tableview, and I want to do something kinda like what the apple voicemail app does, so when you click on a cell, it is persistently selected, and then a little view pops up on the bottom. Ive attached an image of what I mean using apple's voicemail app as an example.
Thx
Just create and add a UIView. Set it to hidden. When a row get's selected set hidden to no.

Or you could animate it's appearance and just have it coming up from the bottom of the window. Again you would create a basic animation block and just change the views coordinates (initially they are set so the view is off the bottom of the view). Apple's code will do the rest.
wuf810 is offline   Reply With Quote
Old 08-07-2010, 10:34 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 651
kapps11 is on a distinguished road
Default

So I jsut did it that i created the view and add it when they select a certain row, and it works great pops up and everything, but when you try to scroll the tableview, the toolbar scrolls with it, so it winds up llike halfway up the screen. Im assuming this has to do with the fact that since im using a UITableViewController, the tableview is the actual view of the controller, but idk a way to fix it. any ideas?

Heres the codes i use:

Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   
	ToolbarController *toolBar = [[ToolbarController alloc] initWithNibName:@"ToolbarController" bundle:nil];
	
	toolBar.view.frame = CGRectMake(0, (self.view.frame.size.height - toolBar.view.frame.size.height), toolBar.view.frame.size.width, toolBar.view.frame.size.height);
	[self.view addSubview:toolBar.view];
	[toolBar release];
	
	if ([tableView cellForRowAtIndexPath:indexPath].frame.origin.y > toolBar.view.frame.origin.y) {
		[tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
	}
}
kapps11 is offline   Reply With Quote
Old 08-08-2010, 12:46 AM   #4 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 651
kapps11 is on a distinguished road
Default

Actually, I figured it out

Just make sure you add it to the SUPERVIEW, and then it wont scroll with the tableview. but then make sure to keep a pointer to it and get rid of it cuz otherwise itll b there in all ur other views too lol
kapps11 is offline   Reply With Quote
Reply

Bookmarks

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: 308
10 members and 298 guests
arash5500, gordo26, HemiMG, linkmx, mediaspree, nobstudio, Objective Zero, Paul Slocum, stanny, Touchmint
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

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