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 Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 05-19-2009, 03:46 PM   #1 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 15
GeoffMilburn is on a distinguished road
Smile INFO BUTTON?

I have a simple one page application that is finished.
I want to add a credits page using the small "i" button to switch to that page.
I have seen many apps with this feature but cant seem to find out how to make it work anywhere on the web.
Please help!
GeoffMilburn is offline   Reply With Quote
Old 05-19-2009, 04:54 PM   #2 (permalink)
New Member
 
Join Date: Mar 2009
Posts: 28
stellarseven is on a distinguished road
Default

Quote:
Originally Posted by GeoffMilburn View Post
I have a simple one page application that is finished.
I want to add a credits page using the small "i" button to switch to that page.
I have seen many apps with this feature but cant seem to find out how to make it work anywhere on the web.
Please help!
Check out the Apple Sample Code for the NavBar app. They have an info button in the top right of the app that when pressed, shows a view containing info on the app.

That could be what you are looking for?
stellarseven is offline   Reply With Quote
Old 05-20-2009, 05:48 PM   #3 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 15
GeoffMilburn is on a distinguished road
Default

Quote:
Originally Posted by stellarseven View Post
Check out the Apple Sample Code for the NavBar app. They have an info button in the top right of the app that when pressed, shows a view containing info on the app.

That could be what you are looking for?
Thanks for the tip I just can't figure it out
GeoffMilburn is offline   Reply With Quote
Old 05-20-2009, 11:47 PM   #4 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
Join Date: Mar 2009
Posts: 292
odysseus31173 is on a distinguished road
Default

If you post the problem, maybe we can help you out?
odysseus31173 is offline   Reply With Quote
Old 05-21-2009, 04:31 PM   #5 (permalink)
New Member
 
Join Date: Mar 2009
Posts: 28
stellarseven is on a distinguished road
Default

Quote:
Originally Posted by GeoffMilburn View Post
Thanks for the tip I just can't figure it out
Are you basically wanting the button to pull up another view? If so, I wrote this the other day and posted it in this thread. A link to the final sample app is found here.

In my app, I had the button on the top right take the user to a UIWebView, which you probably don't want to do.
stellarseven is offline   Reply With Quote
Old 05-21-2009, 07:39 PM   #6 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
Join Date: Oct 2008
Location: Toronto, Canada
Posts: 18
cbiggin is on a distinguished road
Send a message via Skype™ to cbiggin
Default

Here's some code for creating the button:

Code:
    UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
    infoButton.frame = CGRectMake(290.0, 10.0, 15.0, 15.0); // puts it top-right
    [infoButton addTarget:self action:@selector(toggleCreditsOpen:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:theButton];
And then, your methods to open/close (create a "Credits" nib file and hook up a Done button somewhere on it):

Code:
- (IBAction) toggleCreditsOpen:(id)inSender
{	
    UIViewController *theController = [[UIViewController alloc] initWithNibName:@"Credits" bundle:nil];
    [self.navigationController presentModalViewController:theController animated:TRUE];
}

- (IBAction) toggleCreditsClosed:(id)inSender
{
    [self.navigationController dismissModalViewControllerAnimated:TRUE];
}
__________________
My iPhone Apps:
KillerSudoku - very difficult variation of Sudoku... popular in UK.
Chris Bosh - his personal app!
PocketCocktails
NerdAlert2000
SixPack App
Easy Recipes
cbiggin is offline   Reply With Quote
Old 05-21-2009, 09:20 PM   #7 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 15
GeoffMilburn is on a distinguished road
Default

THANKS TO ALL OF YOU!!
I have it working now, that was just the help I needed
GeoffMilburn is offline   Reply With Quote
Old 06-09-2010, 04:30 AM   #8 (permalink)
Registered Member
 
Jules2010's Avatar
 
Join Date: Apr 2010
Location: UK
Posts: 157
Jules2010 is on a distinguished road
Default

Quote:
Originally Posted by cbiggin View Post
and hook up a Done button somewhere on it
What should go in the done button?

Thanks.
Jules2010 is offline   Reply With Quote
Old 03-18-2011, 11:40 PM   #9 (permalink)
Beginner iOS Dev
 
Join Date: Feb 2011
Location: Boston
Posts: 372
cityofangels is on a distinguished road
Default

Quote:
Originally Posted by cbiggin View Post
Here's some code for creating the button:

Code:
    UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
    infoButton.frame = CGRectMake(290.0, 10.0, 15.0, 15.0); // puts it top-right
    [infoButton addTarget:self action:@selector(toggleCreditsOpen:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:theButton];
sorry to bring up an old thread, but for [self.view addSubview:theButton], what is theButton? I thought it should be infoButton but im kinda confused there.
cityofangels is offline   Reply With Quote
Old 03-19-2011, 08:00 AM   #10 (permalink)
Registered Member
 
Jules2010's Avatar
 
Join Date: Apr 2010
Location: UK
Posts: 157
Jules2010 is on a distinguished road
Default

Quote:
Originally Posted by cityofangels View Post
sorry to bring up an old thread, but for [self.view addSubview:theButton], what is theButton? I thought it should be infoButton but im kinda confused there.
Yeah it will be infoButton
Jules2010 is offline   Reply With Quote
Reply

Bookmarks

Tags
button, info, view change

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: 381
9 members and 372 guests
apatsufas, comicool, dansparrow, husthlj, LunarMoon, mer10, Murphy, padsoftware, pbart
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,677
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, husthlj
Powered by vBadvanced CMPS v3.1.0

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