IPhone Development - Switching Views

First, let me mention that this post may be in the wrong forum, so if that is the case, please let me know to repost.
Next, my question is very simple. I have two views. The first has a button. The second has some text. I want to switch from the first, which loads when the app starts, to the second. This should be pathetically easy, but I have yet to figure out how it's done. At this point, their must be a fundamental problem with the way that I am thinking about how Windows and Views are managed, because based on my current beliefs, I cannot figure the rest out. I have created several "1-View" applications and, for what I am trying to do, have created several Views each of which do what I want them to do. But, I cannot find a way to switch from one to the other. I go to several homemade videos of people doing it, but no two people do it the same way and they all have their own little tricks to getting it done. This leads me to believe that it's not simply a matter of a lack of documentation by Apple, but that Apple doesn't even have a standard. Instead the have several hacked-together solutions that each can kind-of work depending on the situation.
Here is the way I am conceptualizing it and maybe someone can show me the error in my thinking. I create a View-based application for the iPhone. I believe that the AppDelegate class that is created for me appears to really just be a Window/View manager class in that it keeps track of the one and only Window and manages which View is currently being displayed in that Window. Then, there is the MainWindow.xib file which is really confusing, because it simply populates itself with whatever is in the ViewController.xib file. It's never even mentioned in any of the code I am given. I imagine it is mentioned elsewhere, but that is irrelevant.
Now, the ViewController.xib file is used along with Interface Builder to create a View from Widgets and link those Widgets' references and corresponding actions to class variables and methods in its corresponding ViewController.h and ViewController.m files. So, it would follow then, that if I wanted to create a second View, so that when a button on the first view was clicked a new, second View would be shown, I would create a new "View.xib" file and corresponding .h and .m files for it. Then, I have a method in my AppDelegate that takes a UIView object and removes whatever view is currently the subview of the window and adds the parameterized view as the new subview. This is also where I would put my transitions.
Now, the new View that I just created doesn't contain the Title Bar or whatever it's called where the battery monitor icon, carrier icon, etc. exist, so this means that whenever I am actually putting Widgets in the View I have to just remember to avoid it and that the "auto-alignment" thing is off. So, I try other options, and create a new "Window XIB". This blows my freakin' mind, because it appears to be what I want despite it being called a Window and not a View. So, I try the "Write Class File", and it creates a new class called UIWindow which is a subclass of UIView. But wait, aren't Views supposed to be what populates the Windows, and UIWindow is a class that already exists. AHHH!!!!
So, I rename the class to SecondView and create an instance of it in the AppDelegate. Now, I go into the AppDelegate.m file and change "window addSubview:viewController.view" to "window addSubview:secondView.view" (Edit: Brackets aren't allowed, so I am using quotes in their place here.) which doesn't compile, because it is a subtype of UIView which doesn't have a view member variable, only UIViewController does. So, I change it to make it a subclass of UIViewController which has a view member variable, and it compiles and shows a blank white screen of which neither of my views look like. Then, I go shoot myself in the face. It would appear that I need to link the new SecondView class to the SecondView.xib file somehow.
It appears that the AppDelegate class should manage nothing and should only have a single UIWindow object that it loads. Then, the View Controller which has a View object should really have an array of all Views and should populate its view object with the currently needed View. This would make sense except that of all the How-tos I have seen none of them do it this way. I am sure that I didn't say everything that I need to say, but at this point I am so infuriated that I cannot think straight.
<rant>
I have developed in several different environments, and I have never come across such a simple and common concept implemented in such a convoluted way. Maybe I am simply missing something obvious, here, but if that's the case, Apple please please please make the documentation far less cryptic. I feel like I'm walking blindly through a jungle when I try to read the How-to documentation on your site. If I need to know some information about some class then it is relatively easy to get to, but trying to figure out how to actually do something within iPhone development is painful.
I began trying to develop for the iPhone by just diving in and seeing what happened. That sort of failed, so I began reading your online help documentation and believe I took a step backwards. Finally, I bought a book on Objective-C that concluded with creating an iPhone app. I read it in a few days and now feel that I am rather proficient with the language as well as creating applications on the iPhone as long as they only consist of a single View in the ViewController class. All I want to do is switch from one View to another, and it shouldn't be this hard.
</rant>
Message was edited by: PhoenixRebourne

Well odds are you won't find what you are looking for here unless another developer happens to come here. These forums all withing the support area are user to user forums to help with issues of usage, repairs, etc.
Doesn't the developer area where you signed up to be a developer have forums?

Similar Messages

  • When I use my IPhone 4S to view the Shaw Go Movie Central App when I am at home I only use WiFi which is automatic, I start watching a show and sometimes I will get a message like "you can not use your cellular for video playback" or something close to th

    When I use my IPhone 4S to view the Shaw Go Movie Central App when I am at home I only use WiFi which is automatic, I start watching a show and sometimes I will get a message like "you can not use your cellular for video playback" or something close to that. Then I received an email from Telus saying I had used my 3G instead of Wi-Fi  using 75% of my data. How can this happen when I'm on Wi-Fi at home? If it switched to 3G for some reason I should have been disconnected and not just transferred to 3G network using up my data. What is the fix for this??

    It doesn't have to be that complicated, Verizon iPhones come unlocked, just tell VZ you're going on Holiday/Traveling and suspend the service, no need to pay for service if you're not going to be using it. Pick up local SIM cards in the countries of your choosing, pop them in, re-activate iMessage and you're set!
    I recommend getting a SIM card from the Three network in England, they have great EU roaming rates and free like-home roaming in Italy.
    Set your phone's region to match the country you're in, it'll save from some headaches when calling local/international numbers.
    To answer your questions,
    1. If you choose not to have a local SIM card, it is good to keep your phone in Airplane mode to save battery.
    2. Make sure the two iPhones have different names to reduce sync/restore issues.
    3. If husband has an iPhone also, you can chat with iMessage/Facetime, just give him heads up about the new number you'll have. Otherwise, use Whatsapp if he's got an Android. You can activate Whatsapp with your American number or the international number if you choose to get a SIM in Europe.
    Also, Get the MagicJack app and/or Google Hangouts, both of those apps provide you with free calling to the USA and Canada using any internet connection. Google Voice is another good way to SMS across the seas.
    Let me know if you need any more tips for iPhoning across the pond.

  • Has anybody experienced the iPhone off switch not working all the time.

    I have an iPhone 5, it's about 16 months old and it has experienced an annoying issue.  The off button does not work all the time, sometimes I have to press it multiple times and other times it just works.  The worst case is when it does not work at all, very frustrating.  I didn't expect this type of issue for a phone that is not even a year and a half old.
    I did some searching on the internet and there are 2 schools of thought, the first is that this is a hardware fault and Apple know about it but won't admit it because it would cost them too much to repair/replace phones with the issue.  The second school of thought is that it is a software issue and a backup/reset/restore will fix it; I tried doing this but it did not resolve the issue.
    Further digging seemed to suggest that it was really a hardware fault and the only option was to get a refurb from Apple for a ton of money, not cool.
    Anyway, if anyone has any more information that could help me resolve this issue I would greatly appreciate it.
    //*eggbox23

    @diesel vdub, thanks for your suggestion, I setup an appointment with the Genius Bar and found out in about 5 minutes that everything I have read up on so far is true.
    Firstly the technician admitted that there is a sporadic fault on the iPhone 4s and iPhone 5 switches, something to do with the design of the switch that included a rubber element that rolls up (whatever that means) and causes the switch to fail. He then indicated that the iPhone 5s does not have the issue because the switch has been completely redesigned.
    Since I was stupid enough to not take out the extended warranty the only options he gave me were to purchase a new phone or to get a refurb for $269, not cool. Why would anyone think that a phone would not work correctly for 2 whole years when the phone only cost about $600!
    Since I have about 7-8 months left on my phone contract I am not prepared to pay for either option.  I find it amazing that a phone can develop this type of issue in such a short time and then expect the customer to pay for their failures.  Apple supposedly sells a very high quality product for a very high price, looks like they have taken a step back from this philosophy.
    I am disappointed in the options that he gave me (I don't blame the technician) but I suppose I expected more from Apple in terms of quality and service.
    //*eggbox23

  • Dumb newbie question on iphone development

    Hi there, just a quick dumb question: Can i develop Iphone apps in Windows platform? This is b'coz I dun have Mac machine.

    a simple answer is YES in opposite of what you read here.
    +I'm a .NET developer and I started building web apps in .NET (ASP.NET).+
    The iPhone/iPod Touch supports 2 different ways to develop something for it, a Web Application (applications that runs on Safari browser, like Facebook and Wordpress) and a SDK Application (Self contain applications, like games, utilities, etc). *Under Windows, you can do any Web Application*, you will need a Mac to do SDK Applications
    Reading the Wrox book entitled: Professional iPhone Application Development (ISBN 0470251557) in page 5 the writer tells about 4 levels to do Web Apps:
    *Level 1 - Full compatible website/application*
    The ground level approach is to develop a Web site/app that is “ iPhone/iPod touch – friendly ” and is fully compatible with the Apple mobile devices. These sites avoid using technologies that the Apple mobile devices do not support, including Flash, Java, and other plug - ins. The basic structure of the presentation layer also maximizes use of blocks and columns to make it easy for users to navigate and zoom within the site. This basic approach does not do anything specific for iPhone/iPod touch users, but makes sure that there are no barriers to a satisfactory browsing experience.
    (just like http://del.icio.us/
    *Level 2 - Web site/application optimized for Safari*
    The second level of support for iPhone and iPod touch is to not only provide a basic level of experience for the Mobile Safari user, but also to provide an optimized user experience for users who use Safari browsers, such as utilizing some of the enhanced WebKit CSS properties supported by Safari.
    *Level 3 - Dedicated iPhone/iPod Touch web site/application*
    A third level of support is to provide a Web site tailored to the viewport dimensions of the iPhone and iPod touch and provide a strong Web browsing experience for Apple device users. However, while these sites are tailored for iPhone/iPod touch viewing, they do not always seek to emulate Apple UI design. And, in many cases, these are often stripped - down versions of a fuller Web site or
    application.
    (just like Amazon.com and Facebook)
    *Level 4 - Native - looking iPhone/iPod touch application*
    The final approach is to provide a Web application that is designed exclusively for iPhone and iPod touch and closely emulates the UI design of native applications. One of the design goals is to minimize user awareness that they are even inside of a browser environment. Moreover, a full - fledged iPhone application will, as is relevant, integrate with iPhone - specific services, including Phone, Mail, and Google Maps.
    I did 2 web apps using Dreamweaver for Windows, using Level 4, coding plain HTML - there is no visual aid, but you just pick up an iPhone/iPod Touch (or if you don't have this, use Safari browser or any WebKit Browser).
    You can always start here
    Remember, if you really want to build a self contain application in Objective-C/Java, then you need a Mac running Leopard (Mac OS X 10.5), with XCode (the Mac Visual Studio) and the iPhone SDK
    Hope that with this you can see some light under Windows

  • Request for iPhone developer forum

    There has been a recent influx of new iPhone developers in the developer forums. They often don't identify their problem as being specific to the iPhone. You have to look at what they are talking about and see that it is all iPhone stuff. Apparently the iPhone SDK is significantly different enough that answers to basic questions for MacOS X development are not correct for the iPhone SDK.
    If there were an iPhone SDK forum they might be more inclined to put iPhone-specific questions in there.

    I completely agree with the previous sentiments for an iPhone developer forum. Why?
    I am part of the problem. I have come into the Apple development process "solely" to work on the iPhone. I know nothing about Mac OS X. Because of that I was astounded that the iPhone documentation was not "iPhone" but rather Xcode documentation. Yes I understand that there is a great deal of overlap BUT from my point of view it looks as though Apple was extremely lazy in just dumping all of their code and documentation on the iPhone developer. They need about 5 editors to weed out what is and is not iPhone. Just my two cents.
    -Doug Danforth

  • What does Private mean at the bottom of my iPhone screen when viewing my windows in Safari?

    Private appears at the bottom of my iPhone screen while viewing open windows in Safari. What does it mean?

    Touching Private will switch ON/Off private browsing mode.
    Private Browsing
    Private Browsing in iOS protects private information and blocks some websites from tracking your behavior. Safari doesn't remember the pages you visit, your search history, or your AutoFill information.
    Note: While Private Browsing is enabled, the Safari bars appear black or dark.

  • [iPhone SDK] Preference view design/implementation

    Hi, everyone!
    I want to add preference view in my application (build on iPhone SDK 3.0), but don't want to use preference bundle for several reasons.
    And I can't find any suitable UI component to do it (maybe it's UITableView with custom views (with rounded corners)?
    Any thoughts on it?
    Thanks for attention.
    Have a good day

    The rounded corners you see in the system Settings app are produced by a UITableView created with UITableViewStyleGrouped. Each group of cells in a rounded frame is a section of the table view, so you can duplicate a typical Settings page by setting the number of sections and the number of rows per section.
    It looks like you could build most of the cells in Settings by simply adding your own images and/or controls to standard UITableViewCell instances.
    Several of the pages in the UICatalog sample app provide good examples of how to code Grouped style table views with cells similar to some of the Settings cells. That sample code is for 3.0, btw, but almost all of the code is appropriate for 2.x as well.
    If you need help with table views and table view cells in general, see the Table View Programming Guide for iPhone OS.
    For more basic instruction, see Chapter 8 of +Beginning iPhone Development: Exploring the iPhone SDK+ by Mark and LaMarche.

  • Iphone got switched to new zealand and I changed it back to US in my itunes but phone store still says NZ!! Help!!

    iphone got switched to new zealand and I changed it back to US in my itunes but phone store still says NZ!! Help!!
    I don't know how it got switched but I'm trying to update apps and it says my ID isn't valid in NZ, to switch back but of course it doesn't tell me HOW.
    I went into ITUNES and checked USA and synced my phone, tried again and still get the NZ warning. What am I missing here? How do I switch the PHONE back to USA store????

    On your phone:
    Settings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region...change here.

  • IPhone Calendar List View Extends Back Only One Year

    My iPhone calendar List view extends back approximately one year despite the fact that I have calendar entries extending back to 1999 and that older data is visible under the Day and Month views. This is a problem because the only search mechanism in iPhone calendar is through the List view. Therefore, any search I conduct extends back only to the data in the List view ... which means back only one year.
    Does anyone have any thoughts or suggestions on how I could change this such that the List view extends to include ALL of my calendar entries and is in conformity with the Day and Month views? (I wanted to ask if anyone knows how to "correct" this, but perhaps Apple has designed it this way to speed-up the searching in List view ... I'm not certain.)
    I am currently running the most recent iOS update, am syncing my iPhone calendar via MobileMe, have upgraded to the new version of the MobileMe calendar, and have ALREADY reset my sync. history, deleted my iPhone calendar and re-synced it, etc. These don't resolve the problem.

    I've noticed that the date to which the List View will "look back" will change depending on software updates or syncs.
    For instance, a few weeks ago my List View went back to December 2009 ... now it goes back to Jan. 2010 (i.e. I lost a month of "look back"). I do not specifically recall what triggered this change, but I reset my sync. log during this period.
    If you make no changes to the sync. log or update the software, the List View start date will stay constant I believe. For instance, if the List View goes back to Jan. 1, 2010 right now it should stay that way until you reset the sync. log or update the iPhone software. Theoretically then the List View can "look back" much longer than 12 months assuming you make no changes to the sync. log or update the software. Of course, this doesn't address our issue here, but I thought I would point out that there seems to be a consistent pattern here and not some random bug screwing things up.
    I'm still thinking that this is the way Apple intended it to work. In other words, that Apple felt it necessary to limit the calendar search feature to approximately 12 months worth of calendars. I hope I'm wrong.

  • How to correct error in iPhone 4S Calendar 'views'?

    I have been using iPhone for years and have the new 4S which I also have been successfully using to sync iPhone Calendar to Google Calendar and my MS Outlook 2007 on my desktop PC (Windows). All has been working flawlessly - syncing in both directions via Google Calendar 'in the middle' of the process.
    Last week I went abroad to a different timezone and whilst I took care to disable (before traveling) 'Cellular data' and 'Data Roaming' under iPhone/Settings/General/Network (and disabling 'Location services' under Settings too) - I notice that a strange error has emerged in my iPhone calendar 'List' view which is new and mysterious. let me explain...
    I first noticed that several same-day (but different type of) appointments I had entered via one of my devices (iPhone or Outlook PC or direct onto Google Calendars via web interface) onto one of these days was being shown on my iPhone calendar LIST view as a new 'day' per appointment. E.g. Let's Say Tuesday 4th June had '0900: meeting Joe' and on the same day had '1000: Meeting Jack' then what actually was being seen on my iPhone Calendar LIST view was two 'Tuesdays' one after the other in the list - each with one of those appointments on. I don't know about you but in my life there is only one Tuesday 4th June in life! There is no such repetition of 'days' under 'MONTH' view and when looking at the 'DAY' view both the Joe and Jack appointments are quite rightly shown on that one single Tuesday day view! What the heck is going on?
    This may have nothing to do with me traveling into another timezone at all as I have done that before without this weirdness happening.The timezones on all three devices are set the same (UK GMT).
    What I want is for the multiple appointments for one particular day to be shown on LIST view as being on one day and not to see that day 'repeated' - one per different appointment.
    Any help anyone has got would be appreciated.
    Many thanks.
    PS. Before you ask - I will not ever be using Apple iCloud for Calendar sync - not ever (MobileMe screwed up my business calendar by wiping all of the data on all devices twice - hence me moving to Google Calendar - a Godsend in comparison)

    That willl work on a camera roll photo - taken with iphone.
    Otherwise you will need to deslect it in itunes and sync.

  • Hello. I want to use my iphone as a viewing screen for a usb endoscope, (its a small camera on a long cable for inspecting down piping and such) with an app is it possible to attach the usb to my iphone using a adapter to watch the live video feed on th

    Hello. I want to use my iphone as a viewing screen for a usb endoscope, (its a small camera on a long cable for inspecting down piping and such) with your app is it possible to attach the usb to my iphone using a adapter to watch the live video feed on the iphone?
    Thankyou.

    Hello. I want to use my iphone as a viewing screen for a usb endoscope, (its a small camera on a long cable for inspecting down piping and such) with your app is it possible to attach the usb to my iphone using a adapter to watch the live video feed on the iphone?
    Thankyou.

  • Error when activating my iPhone Developer Program membership

    Ive just paid 99 dollars for my iphone developer program, and recieved an email containing the activation code. As you probably know, youre supposed to click on this activation-code and it links you to another site. But instead of activation I recieve this error-message on this site:
    "We are unable to activate your iPhone Developer Program membership because we are unable to successfully verify your identity. Please contact us and reference Enrollment ID# XXXXXXXXXX for further assistance."
    There was no problem verifying my identity when I paid for it. How come thats an issue now?
    Since people seem to have to wait for enormous periods of time to get even the simplest questions answered by Apple regarding the Dev Program, I thought I post this here to see if someone else have come across this, and what to do about it (except for waiting indefinitely).

    Mine got activated after a few days with no need for further information from me so if you get that same message you probably don't need to worry.

  • Hi, I upgraded my iphone 4 to iso 5 beta 6, but now it shows "No Service" at top left, and unable to complete your activation. Also tels that this device is not registered as part of the iphone developer programme. How could I fix this problem? Please..?

    Hi, I upgraded my iphone 4 (4.3.3) to iso 5 beta 6, but now it shows "No Service" at top left, and unable to complete your activation. Also tells that "this device is not registered as part of the iphone developer programme." How could I fix this problem? Please help me...,

    I had a similar occurrence with my just activated iPhone 4.
    I had been using the phone for three days when an odd occurrence with voice mail caused me to call tech support. After some discussion they decided to push the activation to my phone (even though I had been using it for three days). When I went to power it back up again I repeatedly got the "no service" notification. I got tech support on a land line and we tried hard reboots and so on. No joy. They told me to take it in to the point of sale and either the SIM card or the phone needed (or both) needed replacing.
    I tried one last hard reboot after dinner and the phone came up with service, but I took it in to the point of sale in the morning and they swapped the SIM card out and I went to a Genius Bar appointment to get the phone checked out. It is supposedly OK, but I am still having some problems when syncing it so I will have to visit the Genius Bar again tomorrow about that. At least I have not experienced the "no service" problem in the roughly 24 hours since the SIM card was replaced. (Fingers crossed)

  • My Iphone 4 will not start up, when i connect it to itunes i says : Activation error This device is not registered as part of the iPhone Developer Program.If you are a member of the Program, please register your device in the iPhone Developer Program Port

    my Iphone 4 will not start up, when i connect it to itunes i says : Activation error This device is not registered as part of the iPhone Developer Program.If you are a member of the Program, please register your device in the iPhone Developer Program Port

    Well, you downloaded a bootleg copy of iOS 7 beta and have installed it on your phone without being a developer. It has bricked your phone and you cannot get help here because doing what you did has voided your warranty. Have a nice day.

  • How long does it take to be an "official iPhone Developer?"

    I decided that I wanted to be a iPhone developer a couple of days after the March announcement. So I filled out the contact information, and of course got the reply that the beta program was full.
    Fast forward to July 14th, when I got a email from the iPhone Dev folks that my application was being reviewed. It is now July 26th, and I still haven't got an answer back. Does it really take this long to even become a developer??? Can someone get turned down? If so, why? Do you have to tell Apple what you plan to develop?
    I have never had to go through such hoops to become a developer for any other platform. You just pay your money and bang there your are, if you even need that. I'm not an official OS X developer because, I really don't need pre-released software.
    Also, since all I want to do is just run my own apps on my own iPhone/touch, do you really have to get the official stamp of approval for Apple to get a 'signature"? Do you have to go through Apple to even distribute your apps, even if you may or may not sell them?
    Finally, is there anyway to get a file to your iPhone application to read outside of adding it to your application's resources, or create a socket and read it in?
    Thanks,
    edji

    I signed up to be an iPhone developer two days ago and today I have my app running on my iPhone. It takes less than a day to get signed up. BUT, you need to watch out for one thing. When I originally placed my order for the $99 SDK I seemed to have checked some tax related checkbox I shouldn't have. The order completed as expected. But 36 hours later I had no email showing the order and I wasn't accepted yet. So I logged into my account on the Apple online store and looked at my order history. Sure enough, my order had a big red flag (not literally) stating I needed to fax in some tax exemption form. What? So I called the 800 number on the bottom of the screen. Since I'm an individual this shouldn't have been required. The guy on the phone sent me over to the small business dept who took care of the issue and the next day I had all my emails showing I was in the program.
    So if you sign up these days and it takes more than a day, check your order status.
    Enjoy,
    Rick

Maybe you are looking for

  • Mac LC 580 won't boot

    My Mac LC 580 won't boot. I have tried the following in a attempt to get it to work: Reset the logic board. Replaced the hard drive. Cleaned the logic board's end connector with contact cleaner. Cleaned the RAM modules with contact cleaner. The only

  • Download Reports of a Dashboard Page

    Hi, I have a requirement to download all the reports published in a page in to excel in a single download button. I know to download report by report by giving report links for each report. Can you guys help me to download all the reports published i

  • Can´t burn cd

    Can somebody help me?  Cannot burn cd from itunes on a windows (sorry) XP system. Import works fine

  • Could not start the oracle orcl service on local computer 1053

    I ve oracle 8i with Windows XP ,when I try to start it manually also it show ing the 1053 could not start the oracle orcl service on local computer 1053 what should i do? Thanks [email protected]

  • Can not cut and paste in Tiger 10.4.4

    I know this is weird but it is true. I have a user who use to cut and paste all the time and now it will not let her. It is almost like the clipord is off or somthing. I copied something and there was not a paste command. I even did command c and com