[iPhone] Back Button

Is there a way to get the left pointed button style that back buttons use?
I'm trying to put a back button on a custom view I created so just setting navigationItem.backBarButtonItem to a UIBarButtonItem doesn't work. It never appears.
I need to set the button to navigationItem.leftBarButtonItem to make it show up in the navigation controller, but that doesn't give me the back pointing button style.
Setting navigationItem.hidesBackButton = NO has no affect.
The navigation controller for this view thinks it is the root navigation controller which is why I'm assuming the backBarButtonItem doesn't work.

The nav bar uses the back button style when there is more than one nav item on the stack. Try adding a dummy nav item onto the nav bar stack and see if that helps.
Message was edited by: RickMaddy

Similar Messages

  • Where is the back button on iphone 5?

    Hi, new to iphones.
    When I open an app like email, text message,  often I find there is no way to go back one screen other than hitting the home button to end the app.
    Am I missing something here?
    Is there a back button like Safari has but for the phone operating system?
    Thanks

    For Mail and Messages it's in the top left corner and it is usually labeled with the page your going to go back to. There is no back button like Safari in those apps.
    Hope that helps.

  • I hit the remove device button on itunes. How do i add my iphone back?

    i hit the remove device button on itunes. How do i add my iphone back?

    You will either need to use iTunes Match or automatic downloads on it, or redownload some of your past purchases.
    Associating a device to an account : http://support.apple.com/kb/HT4627

  • Back button in iphone

    Hello,
    I would like to include a back button as part of an html page however, it seems like 'history.back()' does not work in mobile Safari.
    Any suggestions on how to make it work?
    Thanks!

    HI,
    Try the iPhone Dev Center here.
    http://developer.apple.com/iphone/
    Carolyn

  • My iphone 4 screen turns into blue, and i can't do anything because my power button is broken. How to fix my iphone back? Please help me

    my iphone 4 screen turns into blue, and i can't do anything because my power button is broken. How to fix my iphone back? Please help me

    I am having the SAME exact problem! Except instead of lock button broken it's my home button so I can't do the whole "put in recovery mode" deal. My screen only says "tap the home button 3 times" and it has my screen locked until I hit the home button but since it is broken I can't get in my phone at all. I have all of my work info in my phone so I'm screwed and can't get any help. PLEASE let me know if you find a way around this...!!!
    Thanks!

  • Iphone 5s ''back'' button?

    So today i bought an iphone 5s and there seems to be a problem.. i was exploring my phone a little and i went to ''messages'' and now there is no way to close that... i cant find exit, or back button anywhere.. am i missing something here?

    If simply tapping the Home button doesn't return you to the Home screen, A reset may help. Tap and hold the Home button and the On/Off buttons for approximately 15-20 seconds, until the Apple logo reappears. When the logo appears, release both buttons.
    No content is affected by this procedure.

  • I bought iphone 5c 4-5 days back from india and today back button of this phone not working, i am totally dissatisfy with the apple service support. i want replacement

    (i bought iphone 5c 4-5 days back from india and today back button of this phone not working, i am totally dissatisfy with the apple service support. i want replacement.)
    Hello i am nitin from india, i purchased a iphone5c because i heard that iphone comes with a great coustmer service, but this statment becomes totally wrong today, when i faced coustmer executive at service center of iphone then he said that i have to check it out and it may be a physical damage, ( how it is possible even i carried this phone with anti shock cover guard and its never fall down from my hand.) the simple thing i know that i want my phone replaced, otherwise it would be a great mistake of my life to purchase an iphone.
                                                                                          Thanks to all apple team for your wonderful service,

    Welcome to the user to User Technical Support Forum provided by Apple.
    For your issue... See here...
    Contacting Apple World Wide for Support and Service
    http://support.apple.com/kb/HE57
    Apple Warranty  >  http://www.apple.com/legal/warranty/
    iPhone Warranty  >  The warranty is only valid in the country of original purchase... Except for EU Countries...

  • HT200150 I pressed the find my iphone delete button and then my phone showed the apply logo. I then got worried and turned it straight off and now it will not turn back on. The apple logo just comes up for about 10 seconds and it goes back off.

    I pressed the find my iphone delete button and then my phone showed the apply logo. I then got worried and turned it straight off and now it will not turn back on. The apple logo just comes up for about 10 seconds and it goes back off.

    Connect your phone to itunes on the computer you use itunes on and open up itunes.

  • In IPhone Apps crash when press back buton . When press back back button Last class is appeared slightly slighly ash, with no error or warning .

    Hi,
    I am developing apps on for 4.1 and on Xcode3.2. My Apps crash when press back buton . When press back back button Last class is appeared slightly than crash, with no error or warning ....Here are the code....crash on Back Funtion
    #import "TransactionSummaryDetailViewController.h"
    #import "TransactionSummaryData.h"
    #import "Constant.h"
    #import "DataBase.h";
    #import "Common.h"
    #import "YPCardHolderServiceService.h"
    #import "SelectionScreenViewController.h"
    @implementation TransactionSummaryDetailViewController
    @synthesize table,cardReference;
    @synthesize waitIndicator,transactionsummary,keyArray,valueArray,isSummaryAvailable;
    @synthesize startDate,endDate;
    // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
        if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
            // Custom initialization
        return self;
    -(void)getrowcount{
        if(transactionsummary.cardholdernmae !=nil){
            [keyArray addObject:@"Card Holder Name: "];
            [valueArray addObject:transactionsummary.cardholdernmae];
        if(transactionsummary.cardnumber!=nil){
            [keyArray addObject:@"Card Number: "];
            [valueArray addObject:transactionsummary.cardnumber];
        if(transactionsummary.debittransactioncount != nil){
            [keyArray addObject:@"Debit Tx. Count: "];
            [valueArray addObject:transactionsummary.debittransactioncount];
        if(transactionsummary.debittransactionvalue!=nil){
            [keyArray addObject:@"Debit Tx. Value"];
            [valueArray addObject:transactionsummary.debittransactionvalue];
        if(transactionsummary.credittransactioncount!=nil){
            [keyArray addObject:@"Credit Tx. Count: "];
            [valueArray addObject:transactionsummary.credittransactioncount];
        if(transactionsummary.credittransactionvalue!=nil){
            [keyArray addObject:@"Credit Tx. Value: "];
            [valueArray addObject:transactionsummary.credittransactionvalue];
    // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
    - (void)viewDidLoad {
        appDelegate = [[UIApplication sharedApplication]delegate];
        keyArray = [[NSMutableArray alloc]init];
        valueArray = [[NSMutableArray alloc]init];
        [self getrowcount];
        NSLog(@"Key Array Count is %d",[keyArray count]);
        [table setBackgroundColor:[UIColor clearColor]];
        [table setSeparatorColor:TableViewCellSeperatorColor];
        [waitIndicator setHidden:YES];
        [self setTitle:@"Summary Details"];
        UIButton *button =  [UIButton buttonWithType:UIButtonTypeCustom];
        [button setImage:[UIImage imageNamed:@"list.png"] forState:UIControlStateNormal];
        [button addTarget:self action:@selector(BacktoView) forControlEvents:UIControlEventTouchUpInside];
        [button setFrame:CGRectMake(0, 0, 76, 44)];
        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
        if(!isSummaryAvailable)
            if([Common isNetworkAvailable])
                [waitIndicator startAnimating];
                YPCardHolderServiceService *services = [[YPCardHolderServiceService alloc] init];
                YPTransactionsSummaryRequest *summaryRequest = [[YPTransactionsSummaryRequest alloc] init];
                summaryRequest.SC = appDelegate.SC;
                summaryRequest.userName = appDelegate.userName;
                summaryRequest.valid =TRUE;
                summaryRequest.cardReference =[NSString stringWithFormat:@"%@",cardReference];
                NSLog(@"Start Date Is %@ and End Date is %@",startDate,endDate);
                summaryRequest.startDate = startDate;
                summaryRequest.endDate = endDate;
                summaryRequest.applicationType = @"M";
                [services getTransactionsSummary:self action:@selector(getTransactionsSummaryHandlers:) transactionsSummaryRequest:summaryRequest];
                [summaryRequest release];
                [services release];
        [super viewDidLoad];
    //Handle the Response of getTransactionsSummary
    -(void)getTransactionsSummaryHandlers:(id) value
        [waitIndicator stopAnimating];
        // Handle errors
        if([value isKindOfClass:[NSError class]]) {
            NSLog(@"%@", value);
            return;
        // Handle faults
        if([value isKindOfClass:[SoapFault class]]) {
            NSLog(@"%@", value);
            return;
        // Do something with the YPLoginResponse* result
        YPTransactionsSummaryResponse* result = (YPTransactionsSummaryResponse*)value;
        if(result.statusCode == 0)
            NSLog(@"Number of Transaction is =%d",[result.transactionSummaryList count]);
            NSLog(@"Step 1 ='%@'",appDelegate.userID);
            NSString *deleteQuery = @"delete from TransactionSummary where userid = ";
            NSLog(@"Step 1 ='%@'",appDelegate.userID);
            deleteQuery = [deleteQuery stringByAppendingString:[NSString stringWithFormat:@"%@ and cardreference = '%@'",appDelegate.userID,cardReference]];
            NSLog(@"delete query= '%@'",deleteQuery);
            [DataBase deleteDataFromTable:deleteQuery];
            NSLog(@"delete query= '%@'",deleteQuery);
            //for (int i =0; i< [result.transactionSummaryList count]; i++)
            for (int i =0; i< [result.transactionSummaryList count] -2; i++)
                NSLog(@"for loop= %d",i);
                YPTransactionSummaryDetails *transactionSummary = (YPTransactionSummaryDetails*)[result.transactionSummaryList objectAtIndex:i];
                NSLog(@"cardholdername= '%@'",transactionSummary.cardholderName);
                /*NSString *insertQuery = @"Insert into TransactionSummary(cardholdername,cardnumber,debittransactioncount,debittransac tionvalue,credittransactioncount,credittransactionvalue,userid) values(";
                insertQuery =[insertQuery stringByAppendingString:[NSString stringWithFormat:@"'%@','xxxx xxxx xxxx %@',%d,%d,%d,%d,'%@',%@)",
                                                                   transactionSummary.cardholderName,transactionSummary.cardNumber,transactionSumm ary.debitTransactionCount,
                                                                   transactionSummary.debitTransactionValue,transactionSummary.creditTransactionCo unt,transactionSummary.creditTransactionValue,
                                                                   appDelegate.userID]];*/
                //Add by sarvesh
                NSString *insertQuery = @"Insert into TransactionSummary(cardholdername,cardnumber,debittransactioncount,debittransac tionvalue,credittransactioncount,credittransactionvalue,cardreference,userid) values(";
                insertQuery =[insertQuery stringByAppendingString:[NSString stringWithFormat:@"'%@','%@',%d,%d,%d,%d,'%@',%@)",
                                                                   transactionSummary.cardholderName,transactionSummary.cardNumber,transactionSumm ary.debitTransactionCount,
                                                                   transactionSummary.debitTransactionValue,transactionSummary.creditTransactionCo unt,transactionSummary.creditTransactionValue,cardReference,
                                                                   appDelegate.userID]];
                NSLog(@"Insert Query for Transaction Summary is %@",insertQuery);
                [DataBase InsertIntoTable:insertQuery];
            //Read Update Data From DataBase and Refresh Table
                NSString *query = @"Select * from TransactionSummary where userid = ";
                query = [query stringByAppendingString:[NSString stringWithFormat:@"%@ and cardreference = '%@'",appDelegate.userID,cardReference]];
            NSLog(@"select query= %@",query);
                NSMutableArray *temp=[DataBase getTransactionSummaryTableData:query];
                if([temp count] > 0)
                    transactionsummary = (TransactionSummaryData*)[temp objectAtIndex:0];
                    [keyArray removeAllObjects];
                    [valueArray removeAllObjects];
                [self getrowcount];
                [table reloadData];
    -(void)viewDidAppear:(BOOL)animated
        CGFloat navBarHeight = 50.0f;   
        CGRect frame = CGRectMake(0.0f, 20.0f, 320.0f, navBarHeight);
        [self.navigationController.navigationBar setFrame:frame];
        [super viewDidAppear:animated];
    -(IBAction)BacktoView
        NSLog(@"in back function..TrasactionSummaryDetail");
        SelectionScreenViewController *screenView=[[SelectionScreenViewController alloc] initWithNibName:@"SelectionScreenViewController" bundle:nil];
        [self.navigationController popViewControllerAnimated:YES];
        [screenView release];
    - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
        return UITableViewCellEditingStyleNone;
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
        return 1;
    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
        return cellHeightForGroupedTable;
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
        if(section == 0)
            return [keyArray count];
        else       
            return 0;
    - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
        NSString *title = nil;
        switch (section){
            case 0:{
                //title = @"Summary Details";
                break;
        return title;
    - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
        if ([self tableView:tableView titleForHeaderInSection:section] != nil) {
            return tableHeaderHeight;
        else {
            // If no section header title, no section header needed
            return 0;
    - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
        NSString *sectionTitle = [self tableView:tableView titleForHeaderInSection:section];
        if (sectionTitle == nil) {
            return nil;
        // Create label with section title
        UILabel *label = [[[UILabel alloc] init] autorelease];
        label.frame = CGRectMake(20, 6, 300, 30);
        label.backgroundColor = [UIColor clearColor];
        label.textColor = HeaderTextColor;
        label.shadowColor = HeaderTextShadowColor;
        label.shadowOffset = CGSizeMake(0.0, 1.0);
        label.font = HeaderTextFontSize;
        label.text = sectionTitle;
        // Create header view and add label as a subview
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320,60)];
        [view autorelease];
        [view addSubview:label];
        return view;
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
        UITableViewCell *cell = nil;
        NSString *cellIdentifier;
        cellIdentifier = @"SectionsTableIdentifier";
        int row = [indexPath row];
        CGRect nameLabelRect = CGRectMake(19 , 8, 240, 29);
        CGRect cardlabelRect = CGRectMake(19,31,240,15);
        UILabel *nameLabel = [[UILabel alloc] initWithFrame:nameLabelRect];
        UILabel *cardnumber = [[UILabel alloc] initWithFrame:cardlabelRect];
        cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
        if(cell == nil){
            cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellIdentifier] autorelease];
        // Remove all subview from cell content view
        for (UIView *view in cell.contentView.subviews){
            [view removeFromSuperview];
         [cell setAccessoryType:UITableViewCellAccessoryNone];
        [nameLabel setTextColor:firstLabelFontColor];
        [nameLabel setFont:firstLabelFont];
        [nameLabel setFont:firstLabelFontSize];
         nameLabel.textAlignment = UITextAlignmentLeft;
         nameLabel.text = [NSString stringWithFormat:@"%@ : %@",[keyArray objectAtIndex:row],[valueArray objectAtIndex:row]];
         [cell.contentView addSubview: nameLabel];
         cell.selectionStyle = UITableViewCellSelectionStyleNone;
        [cell setBackgroundColor:[UIColor clearColor]];
        [cell setBackgroundColor:TableViewCellColor];
        [nameLabel setBackgroundColor:[UIColor clearColor]];
        [cardnumber setBackgroundColor:[UIColor clearColor]];
        [cardnumber release];
        [nameLabel release];
        return cell;
    // Override to allow orientations other than the default portrait orientation.
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceO rientation {
        // Return YES for supported orientations
        return (interfaceOrientation == UIInterfaceOrientationPortrait);
    - (void)didReceiveMemoryWarning {
        // Releases the view if it doesn't have a superview.
        [super didReceiveMemoryWarning];
        // Release any cached data, images, etc that aren't in use.
    - (void)viewDidUnload {
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    - (void)dealloc {
        [table release];
        [waitIndicator release];
        [keyArray release];
        [valueArray release];
        [transactionsummary release];
        [super dealloc];
    @end

    This is the user-to-user tech support site.  For carrier issues go to the Dev forums.
    You might want to note that the current iOS is 4.3.3, and the current SDK is 4.3 and XCode 4.0.2

  • IPhone: NavigationController Back Button

    The back button on a navigationController is supposed to be automatic, right? I have a table view hierarchy with a navigation controller that has two table views. I can click on a cell in the root view and it does the transition to the next view. However, when I click on the "back" button on the navigationController, the navigationController does a transition and displays the title of the root view, but the table view does not change back to the root view. I checked, and the stack still contains two objects after this half-transition. I can call popViewControllerAnimated myself from the second view, but I didn't think this was necessary. Also, I wouldn't know where to Is there some sort of flag I need to set if I want popViewControllerAnimated to be called automatically?
    Thank You,
    Bridger Maxwell

    I have looked through a few examples which use the UINavigationBar, and I can not find any differences between their code and mine. I even used a lot of code directly from one example. It is quite puzzling.
    Just so I can check, is there a way to prevent the back button from working by catching a message or something? I found
    - (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item
    in the docs as a method you can implement for a UINavigationBarDelegate protocol, but I can't even set the delegate for the UINavigationBar because I am using a UINavigationBarController, and the docs say I should never access the UINavigationBar inside the UINavigationBarController. I am really quite puzzled on this.
    Thank You,
    Bridger Maxwell

  • [iPhone] Invisible Navigation Back button item?

    I'm a little perplexed on this one. I've started a project based off the Navigation Controller template in Xcode, which is table based, and I push a view controller onto the stack, it shows up just fine.
    The problem is, after this new view is pushed, there's no Back button in the navigation Bar. Well, not visible at least. If I click on the navigation bar on the left side, where the Back button should be, it goes Back! But I can't figure out why it's not showing.
    There's a property like self.navigationItem.hidesBackItem or something like that, but setting it to NO had no effects.
    Anyone?

    Aha!
    You nailed it. Problem solved. And I guess that makes sense, the Back button I guess is derived from the title of the previous view (seems to me though it should have some default value like "Back").
    Thanks so much
    JB

  • [iPhone] - Add command to a navigation controller back button?

    I have a root navigation controller with a table view going to a normal view controller. The normal view controller plays a sound but I am wanting the sound to stop when the back button is pressed to go back to the root view. Currently, the sound will continue playing until it ends. Where do I put the code to stop the sound when the back button is pressed?
    Thanks!

    You could place it in the UIViewController delegate method - (void) viewWillDisappear:(BOOL)animated.

  • Can't click back button in Safari on Iphone

    I'm not sure at which update this began, but I recently realized I can't use the back button in Safari. It just stays dimmed, when normally once you navigate to a new page it illuminates and then you can use it to go back. This is very annoying. Any suggestions?

    Johnster .....
    I am getting the same icon that you are getting whether I use mobile Safari or iCab Mobile identified as Firefox or even if I identity it as mobile Safari. I wonder if that means perhaps the podcasts was not created correctly. However, I know absolutely nothing about creating a podcast.
    You obviously have been doing this successfully up until this point, but by virtue of the fact that I am getting the "No Plugin" icon in both browsers - whether viewing as a desktop browser or a mobile browser, I simply assume that there is a problem with the podcast.
    The podcast plays fine in my desktop Safari on my MacBook.
    Just so that you know, the preinstalled apps are only updated when the iOS is updated. There are never updates released for Safari, iTunes, the App Store and so on, except for the features that may be added when the iOS is updated.

  • [iphone] Remove back button from navigation bar

    I have an app set up with a navigation controller which is working fine. What I'd like to do is remove the back button when certain views come up. In fact I can't seem to manipulate the back button at all. I tried putting self.navigationItem.backBarButtonItem.title = @"TestTitle"; in the view controller for one of the views in the app, and the title doesn't change. Mainly I would like to remove the back button. Anyone have an idea? This is on beta 6.
    Thanks.
    Message was edited by: Lysandus

    Each view controller that is being managed by your UINavigationController has a property called navigationItem. You should do something like this in the managed viewController:
    self.navigationItem.hidesBackButton = YES;
    hope that helps

  • Can the back button of an iPhone 5s flash an LED light on any notification

         will the back button flash on any notification

    Yes, turn on Settings > General > Accessibility > LED Flash for Alerts

Maybe you are looking for

  • Adding the line items in mapping

    Hi Experts, I got the structure like this. Item    (0 to unbounded)     amount   (1 to 1). I am getting more than one amounts, I need to add all the amounts and map it to target field "sum". For this how can i do the mapping can anybody please help m

  • Group Left  report

    Helo all, Iam trying to create a group left report (Time report) I need something like this code Client_name county Average1 02 Elias Mulain Central Cf_1/Count           North Cf_1/Count South Cf_1/Count SouthWest Cf_1/Count Cf_1= (staff_date-access_

  • I want to check that how many users are connected to the wifi which i m using at present

    i want to check that how many users are connected to the wifi which i m using at present???

  • Problem in BI scheduler setup-can not save the ibots

    hi gems... I am trying to setup the BI scheduler in the BI Analytics in a solaris environment....first of all i have set the BI Analytics and i am able to see all the reports...but when i am trying to save the ibots to schedule the reports then it is

  • Classification extractor (CTBW) - problems with deleted classifications

    Hello all, we have several classification objects on 0customer. Until now we always made a FULL load for this classification extractors but now we realized the following problem: If a customer has an classification and it is deleted we don't get the