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-2011, 10:57 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 2
Natator is on a distinguished road
Question Problem with button behaviour

Hi all

I am trying to make a small alteration to some code and getting nowhere.

I have some code that when the button is clicked it took you to a web page and there was a "Back" button to return you to the app. All worked fine. Here is the code and I can see why it works the way it does:


-(IBAction)btnBlogPress
{
MyWebBrowser *_webBrowser = [[[MyWebBrowser alloc] initWithNibName:@"MyWebBrowser" bundle:[NSBundle mainBundle]]autorelease];
_webBrowser._link = BLOG;
_webBrowser.pdelegate = self;
[Common pushController:_webBrowser withTransition:UIViewAnimationTransitionFlipFromRi ght withNavigationController:self.navigationController];
}

The BLOG was a web page but I am trying to alter the code so that button now opens up the App Store so people can buy the full version (this code is in the Lite version).

BLOG therefore now translates to:

itms-apps://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=452677920&mt=8

This seems to correctly start the app store (on iPhone/iPad) and put you into it.

THE PROBLEM:

When you go back into the app there is a blank page, with a "Back" button at the top.

However, what I WANT IT TO DO is: You click on the button, opens App Store (as it does now) BUT within the App it just stays on the screen it was on (that had the button on that was clicked).

Can someone please have a look at the code snippet above and help me

Thanks in advance

Simon
Natator is offline   Reply With Quote
Old 08-08-2011, 10:56 AM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

Use the UIApplication's openURL method instead of pushing anything on your nav controller.
smithdale87 is offline   Reply With Quote
Reply

Bookmarks

Tags
button, click

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: 399
15 members and 384 guests
7twenty7, blasterbr, buggen, chiataytuday, dedeys78, dre, fiftysixty, gmarro, HemiMG, jimmyon122, jonathandeknudt, LEARN2MAKE, pungs, tymex, UMAD
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,669
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, dedeys78
Powered by vBadvanced CMPS v3.1.0

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