[iPhone] Navigation-Based Application template / UITableViewController

I'm new to development for both Mac OS X, the iPhone and Objective-C, but do have decent experience with C/C++. I'm trying to put together a series of simple iPhone applications to help expand my knowledge and wanted to ask whether or not I've got the right idea regarding my next test application.
I've used the Navigation-Based Application template to create an application that loads a Table View and populates it with a few items. I'm considering this Table View as the root menu for my application. Selecting an item from the Root Menu will take the user to a sub-menu (that is specific to the Root Menu selection). Selection of an item from the sub-menu will take the user to a view that'll let them perform a particular action.
I'm wondering the best way to go about structuring this kind of application? Should I create a controller class and accompanying xib for each of my sub-menus? If this is the case, would I have to use the didSelectRowAtIndexPath method to detect which menu item has been selected in order to determine which sub-menu view to push?
I'm happy to get my hands dirty and experiment (which is why I'm taking these baby steps), but I'm hoping someone with a little experience can come along and shed some light on how a relative professional would go about doing something like this?

Sounds like a good approach. You can use initWithNibName to load a view from a nib / xib. You can also re-use the same xib for different instances of the submenu view by parametrizing initWithNibName and do any customization to the controls in viewDidLoad.

Similar Messages

  • Nav based app template question (iphone)

    Hi,
    I have used the navigation based application for a hello world type application, but want to extend it to support 2 tableviews on the first screen.
    It seems like the one automatically created is called "tableView" in RootController.xib).
    I can create a view and then put the 2 tables views as children, but I don't know how to name them topTableView and bottomTableView.
    Can I still use the nav based app template for this?
    thx

    sorry, I'm a bit new to this as well, but I believe you would add two IBOutlets to your view controller (name them bottom and top) and then connect them via the interface builder to your actual table views. i don't think you get to name them in the properties panel like you would in visual studio, but this would give you access to them from your code.
    good luck!

  • Table View in View-based Application

    Hi.
    I want to use an UITableView in a View-based Application.
    All examples I found are for Navigation-based Applications.
    I Found only one example for View-based Applications, but it create all components himself without the Interface-Builder.
    I search an example with Interface-Builder.
    My main problem is, when i create a view with Interface-Builder, the controller class does not inherit from UITableViewController.

    GrinderFX wrote:
    I want to use an UITableView in a View-based Application.
    Hi, and welcome to the Dev Forum!
    Firstly, I would point out that you don't need to use UITableViewController to control a table view. The table view controller is just more convenient. So for example, you could simply drag a table view from the library in IB and drop it onto your view. Then you could hook up the table view's dataSource and delegate outlets to the File's Owner. Then you would add the data source and delegate protocols to the @interface of your UIViewController subclass and add the required data source and delegate methods to the @implementation.
    I mention the above because building your table view that way is very instructive. If you want to learn more about table views in general I would recommend Chapter 8 of +Beginning iPhone Development: Exploring the iPhone SDK by Mark and LaMarche+, which includes 3 table view projects that don't involve a navigation controller.
    My main problem is, when i create a view with Interface-Builder, the controller class does not inherit from UITableViewController.
    Returning to your specific question, IB allows you to change the class of an object. Here are the steps to use the View-Based Application template as you described (In the following I'm using Grinder as the name of the project; e.g. the app delegate class is named GrinderAppDelegate, and the view controller subclass is named GrinderViewController):
    1) _Change parent of view controller subclass in your code_
    In GrinderViewController.h, you only need to change the superclass from UIViewController to UITableViewController:
    @interface GrinderViewController : UITableViewController {
    However it will be easier later on if you make new files from the UITableViewController file template:
    a) Ctrl-click on GVC.h and GVC.m in the Groups & Files tree; select Delete->Also Move to Trash;
    b) Ctrl-click on Classes; select Add->New File->iPhone OS->Cocoa Touch Classes;
    c) Select UITableViewController subclass from the right center panel and click Next;
    d) File Name: GrinderViewController.m; check Also create GrinderViewController.h;
    e) Make sure the name for these new files is exactly the same as the ones you deleted; if you make a mistake here, delete the new files and start over, because that name must be the same in several other files;
    f) Click Finish; the replacement files should now appear under Classes.
    2) _Change the view controller class in IB_
    a) Double click on MainWindow.xib under Resources in the Groups & Files tree;
    b) Make sure the MainWindow.xib window is open by selecting Window->Document from the IB menu;
    c) Locate the View Mode switch, upper-left, in the xib window, and select the Center position;
    d) The xib window should now be displaying two columns with small icons on the left;
    e) Select the Grinder View Controller icon;
    f) Select Edit-Delete to delete that icon;
    g) Select Tools->Library from the menu, and expand Controllers in the Library Panel;
    h) Drag a Table View Controller to the xib window and drop it right under the app delegate icon;
    i) Select Tools->Identity Inspector from the menu to open the Grinder View Controller Identity Panel (the new Table View Controller should still be selected in the xib window);
    j) Under Class Identity, select Grinder View Controller from the list; tab out of the Class field to be sure the selection is recorded;
    k) Ctrl-Click on Grinder App Delegate and connect the view controller outlet (ctrl-drag) to Grinder View Controller;
    l) Expand GVC in the xib window and delete the Table View icon (since we want it in the other xib file);
    m) Reselect the GVC icon and open the Grinder View Controller Attributes panel;
    n) Under View Controller, select GrinderViewController from the NIB Name list;
    o) In the Table View Controller IB Editor window, select GrinderViewController.nib to open the other xib file;
    p) Make sure the GrinderViewController.xib window is open in small icon mode as in steps b-d above;
    q) The class of the File's Owner should be GrinderViewController;
    r) Delete the View icon;
    s) Drag a Table View from the Library to where the View icon was;
    t) Ctrl-click on File's Owner and connect (ctrl-drag) it's view outlet to the Table View;
    u) Ctrl-click on Table View: connect both the dataSource and delegate outlets to File's Owner;
    v) File->Save both xib files.
    3) _Make some rows in the table view and test_
    a) Open GrinderViewController.m in Xcode;
    b) Add the commented lines (be sure to use the correct line for your target OS);
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 20; // <-- change to more than zero
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
    // Configure the cell
    // add this line for OS 2.x
    cell.text = [NSString stringWithFormat:@"Row %d", indexPath.row];
    // add this line for OS 3.0
    // cell.textLabel.text = [NSString stringWithFormat:@"Row %d", indexPath.row];
    return cell;
    c) Build and Go.
    I should add that the procedure might be a little easier if you start with the Window-Based Application Template. But the above is good practice in editing xib files.
    Hope that's helpful!
    - Ray

  • IPhone OpenGL Application Template - Perspective and Depth?

    Has anyone been able to get a perspective scene with depth to render using the new OpenGL Application template in XCode? I can't get anything to work other than Ortho.
    Thanks!
    Message was edited by: rmberg

    did you solve this? I am having the same issue.

  • Authentication between Single Sign-On and Web based applications

    Hi everyone,
    I need to create a way in Portal 10g (10.1.2.0.2) that allow me to do the following:
    Once the user is logged on Portal (against Single Sign-On - SSO) he doesn't need to retype his username/password when he access a web based application throught the portal, in my case, an ASP application (not .NET, just ASP).
    I made a test creating a External Application in SSO and after publishing this portlet (external application) inside portal.
    It worked, BUT I was prompted to inform username/password to log on the aplication.
    So, the user end up entering his password twice.
    Does anybody know a way to acomplish this task?
    The documentation I'm researching is:
    Oracle Application Server Single Sign-On
    Administrator's Guide
    10g Release 2 (10.1.2)
    B14078-02
    Oracle Application Server Single Sign-On
    Security Guide
    10g Release 2 (10.1.2)
    B13999-03
    Thank you very much,
    Diogo Santos.

    have figured out how to secure any HTML, ASP, PHP, CFM, etc. web page again Portal / OID using the PDK toolkit.
    Using AJAX (Asynchronous JavaScript and XML) and one Oracle Stored Procedure just adding a simple Javascript call to any HTML, ASP, PHP, etc. web page can secure it via Oracle SSO (OID). Access to any secured web page will require that it to be linked from an authenticated Portal session or a page opened in an authenticated Portal session.
    This process can be easily modified to add in group security etc. This is just my starting point.
    1) Create a stored procedure
    # Make sure it has access to portal.wwctx_api.is_logged_on
    CREATE OR REPLACE PROCEDURE login_ajax_check (
    display_error IN number default NULL) AS
    BEGIN NULL;
    If portal.wwctx_api.is_logged_on = false then
    htp.prn('DENY');
    ELSE
    htp.prn('ALLOW');
    END IF;
    Exception when others then htp.p('DENY');
    END;
    2) Use this Javascript in any page you wish to secure.
    <-- Begin Paste Here -->
    <script>
    var allowgo=2
    function ajaxCallRemotePage(url)
    if (window.XMLHttpRequest)
    // Non-IE browsers
    req = new XMLHttpRequest();
    req.onreadystatechange = processStateChange;
    req.open("GET", url, false);
    req.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
    req.send(null);
    else if (window.ActiveXObject)
    // IE
    req = new ActiveXObject("Msxml2.XMLHTTP");
    req.onreadystatechange = processStateChange;
    req.open("GET", url, false);
    req.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
    req.send();
    else
    return; // Navigateur non compatible
    // process the return of the "ajaxCallRemotePage"
    function CheckPortal()
    ajaxCallRemotePage('[Your page calling the procedure from above]');
    function processStateChange()
    if (req.readyState == 4)
    if (req.status == 200)
    if (req.responseText.substring(0,4) == 'ALLO')
    allowgo = 0;
    else
    allowgo = 1;
    function doPage()
    if (allowgo==1)
    window.location='[Your login or error page]';
    CheckPortal();
    doPage();
    </script>
    <-- End Paste Here -->
    That's it!!! Super easy. It works great too.
    Larry Schenavar
    [email protected]

  • Problems with location based applications

    I am having problems with all of my location based applications i.e. none of them work. It seems I can never be located by the GPS no matter where i am and i just get a permanently spinning wheel. I have deleted and reloaded the Apps (although even with the generic Maps App i cannot be located) and i have reset the phone Reset iPhone (but havent Reset Settings or Restored yet). I love my iPhone but this is very frustrating. Can someone please help ?

    Didn't work unfortunately. My Location Services were On so i proceeded to Restore. All went ok on the Restore but i still have the same problem. I have 4 App's that are location based and none of them work. Your suggestion ? Thanks for your help.

  • Open a BEx Analyzer Workbook from a Web Application Template

    Hello All,
    I want to open a BEx Analyzer Workbook from a Web Application Template.
    My vision is, that I have got a Button in my Web Application Template and when clicking on
    it a Web Analyzer Workbook opens. The Analysis Item in the template and the Grid in the workbook are based on the same DataProvider. So you can open the report in web or in excel, but the people shouldn't open Excel separately when they use the web frontend.
    I only found an export function, but this doesn't open a workbook. I couldn´t find a good solution here as well...
    Best regards

    SAP STANDARD BSP RSR_BEX_LAUNCH

  • [iPhone SDK] Background applications

    Hello, Developers
    Quick question. Is it still depreceted to run background processes on iPhone?
    I still hope to create service-based application...
    Thank you.

    Any idea of a "service" for a native iPhone app would have to be controlled by an external server. For instance I believe BeeJive or one of the IM clients keeps you logged in even when the app isn't running. This must be because they're syncing with a server much like the future PUSH notifications will do.

  • Location Based Applications don't work

    I am having problems with all of my location based applications i.e. none of them work. It seems I can never be located by the GPS no matter where i am and i just get a long spinning wheel before i get a message back saying something like 'Location can't be found'. I have deleted and reloaded the Apps (although even with the generic Maps App i cannot be located). I have reset the phone using Reset iPhone. I have Restored the phone. And now i have just got a NEW handset - yet they still don't work. In Settings -> General -> Location Services, i have the setting switched to On. Surely i can't be that unlucky to get TWO faulty handsets ! This is very frustrating as i just can't work it out. Can someone please help ?

    I actually got this to work today by telling Siri (precisely) "remind me when I arrive here to xxxxx". First time it's ever worked. Please consider the problem solved.

  • SSO - session time out while navigating across applications

    Hi,
    Problem statement
    Handling session time out while navigating across applications involving SSO
    Current approach
    Application 1
    1. Create session1.
    2. URL rewrite the sesssion ID1 into the link refering to App2.
    Application 2
    1. Create session2
    2. Get the session Id of App1.
    3. send the session ID of App1 in the header
    4. Invalidate the session2
    Application 1
    Get the ID from request and invoke getSession.
    I'm having a very large session timeout at App1.
    Is there a better approach. Ex: Having global session which is shared across multiple
    webapplications.

    "madhav" <[email protected]> wrote:
    >
    Hi,
    Problem statement
    Handling session time out while navigating across applications involving
    SSO
    Current approach
    Application 1
    1. Create session1.
    2. URL rewrite the sesssion ID1 into the link refering to App2.
    Application 2
    1. Create session2
    2. Get the session Id of App1.
    3. send the session ID of App1 in the header
    4. Invalidate the session2
    Application 1
    Get the ID from request and invoke getSession.
    I'm having a very large session timeout at App1.
    Is there a better approach. Ex: Having global session which is shared
    across multiple
    webapplications.
    I have similiar problems in my system. What do you do if the session 1 times out
    during ongoing operations in App 2 ?
    Thanks
    Kejuan

  • To convert applet-based application?

    Hi
    There are some tools on market to run an applet-based application on server side. Those tools convert the behavior of applet application to Jsp application. So they run the application on web server and send HTML to web browser.
    One of those tools is WebCream(www.creamtec.com)
    Would appreciate to let me know other tools or any other ways to achive this.
    Thanks in Advance.

    repost

  • How to add iad's to window based application in xcode for ios

    hello,
    Im trying to add iad's to a window based application. I add the framework and add the banner in interface builder. The program builds without any problems but when I try to run the application on the simulator, the app crashes. Don't know what im doing wrong. Do I need to add any extra code or something. Please help, thanks in advance

    hello,
    Im trying to add iad's to a window based application. I add the framework and add the banner in interface builder. The program builds without any problems but when I try to run the application on the simulator, the app crashes. Don't know what im doing wrong. Do I need to add any extra code or something. Please help, thanks in advance

  • Conversion of forms5.0 to web based application

    dear folks,
    i have an existing application which runs on forms 5.0. i want to
    convert it to a web based application. i do not want to rewrite
    the scripts.if some of you could tell me the details about how to
    go about it.
    null

    I am not sure if there is any tool to do that.
    You can delete WebSphere specific xml files from ear/jar and open it in Weblogic's builder tool. Weblogic Builder is a GUI tool. Helps you assign values for deployment parameters, Transaction attributes, JNDI names and so on. Then you can generate deployment descriptors. Subsequently you can modify the descriptors as and when you want.

  • Client/Server to Web-Based application Conversion

    Hi! Everyone,
    I have couple of questions for you guys.
    Our Client had recently upgraded Forms 4.5 to 6i to move from Client/Server based application to Web based application.
    They are using Forms Server 6i Patch Set 1, OAS 4.0.8.1, Windows NT Service Pack 5 and Oracle 7.3. They are facing the following error every now and then, when they run the forms,
    "FRM-92100: Your connection to the server was interrupted. This may be the result of a network error or a failure on the server.You will need to re-establish your session."
    Please let me know what might be causing the above error. The only problem i can think about might be Oracle 7.3. If i am right only Oracle 8 and above supports Forms 6i.
    Can anyone let me know some tips and/or techniques to upgrade Forms 4.5 to 6i. If there are any important settings/steps which we might have over looked during the upgrade, please list them.
    Any kind of help is greatly appreciated.
    Thanks,
    Jeevan Kallem
    [email protected]

    Most of the code is use with no changes at all.
    See otn.oracle.com/formsupgrade
    Regards
    Grant Ronald

  • How to integrate web based application to windows based application

    Hi,
    Experts,
    we developed web based application in this when we raising
    invoice document after adding this we need to updated Amount
    in integratee SAP B1 then that Amount we need Update The
    Amount  in OACT Table  how we can Update in Amount Field
    in OACT Particular Account Code. plz Guide  me. and how to
    integrate web absed application to windowbased application
    plz help me.
    Regds,
    Samapth.

    Dear sampathdevunuri kumar,
    You may develop the addon based on SDK DIServer for required function.
    The DI Server is an extension of the DI API and supports all its objects. It is intended for high-volume data integration, where numerous client connections must be managed simultaneously and optimized for speed. It is also suitable where Web-services architecture is preferred.
    Please refer to SDK help and SDK DIServer sample for more information.
    Best Regards
    Jane Jing
    SAP Business One Forums team

Maybe you are looking for

  • Memory Limit for "IMPORT/EXPORT from MEMORY ID" statement

    Hi All, Can anyone tell me whether there is any memory limit exists for "IMPORT/EXPORT from MEMORY ID" statement. Like may be we can transfer xx MB of data via this......or it is open, we can transfer any amount of data to ABAP memory via this. Regar

  • Problem while updating Data through IDOC

    hi! I have declared an Internal Table like a structure which has 10 fields. To generate Idoc i need to pass the records from Internal Table to EDIDD-SDATA. Since SDATA is a string of Char 1000, i'm concatenating all the columns of internal table to a

  • GUI swing objects mass quantity color change(fore&back)

    Alright here is what I am trying to achieve: I have almost 300 items in my GUI, I want to change the font and background color of EVERYTHING at once. I added the items to the GUI for my little application over the course of a few weeks of scripting s

  • AdobeControl.CAB not verified

    Hi all, I am having an issue while opening adobe forms in IE 6. The error is " Windows has blocked this software as the publisher cant be verified" . The software is AdobeControl.CAB. I am getting this error both for reader versions 7.0 and 8.0 Pleas

  • Audio won't render

    I have a nested sequence, HDV into HDV timeline, and the audio requires rendering. (once i open the nest up it can play in real time for some reason.) Th problem is that it refuses to render at the moment. When i tell it to render for playback, the r