Note that there are some explanatory texts on larger screens.

plurals
  1. PONavigation Bar "back" Button to dismiss Modal View
    primarykey
    data
    text
    <p>I´m trying to create something like an own "adBanner" for a website in my app.</p> <p>The Banner is a Button with an image, which is actually the banner graphic.</p> <pre><code>[_adBanner setBackgroundImage:[UIImage imageNamed:@"test_banner.png"] forState:UIControlStateNormal]; _adBanner.opaque = YES; [self.view addSubview:_adBanner]; [(UIButton*) _adBanner addTarget:self action:@selector(showWebView:) forControlEvents:UIControlEventTouchUpInside]; [_adBanner release]; </code></pre> <p>here is my function for flipping the view</p> <pre><code>- (IBAction)showWebView:(id)sender { XLog ("Button Clicked"); WebViewController *_webViewController = [[WebViewController alloc] init]; _webViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:_webViewController animated:YES]; </code></pre> <p>}</p> <p>in my _webViewController I want to show a UIWebView with an url</p> <p>First I coded a Navigation Bar with Title</p> <p>WebViewController.m :</p> <pre><code>// Setting Navigation Bar CGRect navBarRect = CGRectMake(0.0f, 0.0f, 320.0f, 44.0f); navBar = [ [ UINavigationBar alloc ] initWithFrame: CGRectMake(navBarRect.origin.x, navBarRect.origin.y, navBarRect.size.width, 45.0f)]; [ navBar setDelegate: self.view ]; [ self.view addSubview: navBar ]; [ navBar release]; // Setting TitleString NSString* adClientTitleString = [ [ NSString alloc] initWithString:@"Client" ]; // Setting Title [ navBar pushNavigationItem: [ [ UINavigationItem alloc ] initWithTitle:adClientTitleString ] ]; [ navBar setDelegate: self]; </code></pre> <p>and now I created a back Button </p> <pre><code>[ navBar showButtonsWithLeftTitle: @"Zurück" rightTitle:nil leftBack: YES]; </code></pre> <p>My question Is How I can make my back Button to dismiss the Modal View again ? Or how can I set the action ?? Thank You for helping</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload