Results 1 to 3 of 3
Discuss How to prevent Navigation Controller from Poping View at the iPhone Developer Exchange - Hackint0sh.org; I have an App that pushes many UIViewControllers. If one view has data that has ...
  1. #1
    Newbie Array

    Join Date
    Aug 2008
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default How to prevent Navigation Controller from Poping View

    I have an App that pushes many UIViewControllers. If one view has data that has been changed I need to prevent the user from pressing the standard back navigation button.

    I thought I could just implement the UINavigationBarDelegate Protocol function shouldPopItem:

    In Interface builder I added a NavigationBar and set the Delegate to the FileOwner.

    However, if I add the function

    - (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item

    It never gets called.

    Is it not possible to prevent the Navigation controller for poping a view?

    Thanks
    Shawn



  2. #2
    Developer Array javacom's Avatar

    Join Date
    Mar 2008
    Posts
    304
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    28

    Default

    You can disable that navigationBarItem.
    Touch Dial is an easy-to-use application for one touch dial / sms icon on the home screen for iPhone.

    This app can read the accelerometer and do phone dial or SMS dial for the same number based on the your setting for Portrait or Landscape Mode of iPhone.


  3. #3
    Newbie Array

    Join Date
    Aug 2008
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Really, how can you do this. I do not add that button myself. It is added by the navigation controller automatically. What I really need is to set my own event when that button gets pressed so I can throw up an alert asking if the user wants to cancel changes or not.

    If I add my own left button then I can control the navigation myself but then I can not change that button to look like the standard navigation button with the left edge like a triangle that automatically grows as the text increases in length.

    Shawn

 

 

Similar Threads

  1. Navigation Controller Pointer for UITableView
    By computerartist in forum iPhone Developer Exchange
    Replies: 1
    Last Post: 10-06-2010, 04:57 PM
  2. MacNN: Sonos Controller iPhone app adds cover art, info view
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 08-10-2009, 11:40 PM
  3. View to View NSUserDefault - Source code included
    By jjgraz in forum iPhone Developer Exchange
    Replies: 0
    Last Post: 03-07-2009, 10:54 PM
  4. Replies: 1
    Last Post: 07-25-2008, 02:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 05:39 PM.
twitter, follow us!