uiviewcontroller

Are modal view controllers the preferred way to replace the entire interface on an iPad?

Specifically, I have something like a game, with a menu screen made out of standard components. I want a button to switch to another view controller that the user will interact with for a while, then return to the menu screen. It seems like having the menu controller present the 'game' mode as a modal view controller is the most straight...

How to jump to 2nd level viewController on startup in navigation based iPhone app

Hi, I have a navigation based iPhone app. Normally you start on the RootViewController, there you can select a row from an UITableView which brings you to another ViewController, let's call it SecondLevelViewController. When the app is started I check if it was quit from SecondLevelViewController (via a parameter saved to the defaultUs...

Is it ok to make multiple UIViewControllers inherit from each other and let only the last one have a nib file?

Hey guys, I am trying to implement a UIViewController hirarchy where the top most UIView Controller implements just a few basic methods the second level view controller a few more methods (depending on which one it is) and the last one on the third level has some more customized methods and also a nib file whereas none of the UIView Con...

How should I organize a project with three distinct views and no tab/tool/navbars?

I've spent too much time walking down dead ends on this project, so it's time to query the hive mind: I am making a simple iPad game consisting of three locations which the user navigates between when an area of the screen is touched. These locations are represented by fullscreen images and there are a lot of different animations and st...

Why isn't UINavigationController popping UITableViewController when I touch the back button?

The navigationBar goes back, but the view stays the same. What gives? ...

Re-create ibook/itunes styled modal dialog

Considering the following images - A book item selected in iBooks on iPad: Image of selected item in iBooks The same UI can be found on the iTunes store app - Clearly Apple is re-using the same controller, transition and "modal" setup. I am working on an application the needs to perform the same kind of contextual/modal implementati...

Why not allocate the UIWindow object in the UIViewController subclass?

Suppose the application will only use a single-purpose view controller. Is there anything inherently bad with allocating the required UIWindow object as a member of the view controller subclass? The programming guide does not provide any examples built this way, although they also don't seem to emphasize whether that's truly allowed or...

What UIViewController method is called when opening app from background?

Hi, Is there any conventient way of determining if a view is being loaded from the app being in background mode? In 3.X I would rely on viewDidLoad to do some initalization etc., this however is not the case for 4.X, as you cannot rely for the viewDidLoad method to be called. I would like to avoid putting in extra flags to detect this...

How to get the applicationFrame minus the height of the UINavigationBar?

I put this in loadView and it works: CGRect navFrame = [[UIScreen mainScreen] applicationFrame]; navFrame.size.height -= self.navigationController.navigationBar.frame.size.height; UIImageView *imageView = [[UIImageView alloc] initWithFrame:navFrame]; But is there a variable like applicationFrame that gives the applicationFrame minus t...

Animate a spinning cube after touch event - iPhone objective c

I have a UIViewController implementation which builds a core image cube and rotates it while there are touches events occuring. It has the following methods: initController touchesBegan touchesMoved touchesEnded continueSpinning I am trying to continue rotating the cube after the touchesEnded fires for an amount of time (say 2 sec...

How to build a "custom navigationcontroller" on the iPhone

2nd edit: Already found the answer: UINavigationController has an option to show a toolbar and this video showed me how to substitue UINavigationController's standard slide animations by something different. Hi all, I'm trying to make an app that uses a navigation bar (top) and a toolbar (bottom) that can swap views in and out and putt...

Presenting a UIDatePicker modally

Hey I have a view that has a button that when pressed should modally present a UIDatePicker. I have the picker showing up properly, but because it is on its own UIView, it is full height, and looks funny. All I want is to get a really quick date input from the user, more like a UIActionSheet than a UIView. How can I make the UIPicker sl...

hide modal tab bar controller - from within a view controller IN the tab bar controller

Hi there I have a first view which has a funky menu thing. Then when you select a menu item it does [self presentModalViewController:tbc animated:YES]; (tbc being a tab bar controller with 5 navigation controllers within it). In each of the navigation controllers I have a Home icon in the navigation bar. I want to be able to link this...

Detecting what view is currently being displayed

I have a problem. I am using three20 and am using TTYoutubeView, this problem does not necessarily require knowledge of three20 to fix I think. My issue is, i have a custom drawMethod on my navigationBar, however, when i load a youtube video, i need to tell it to ignore my custom draw method (this isn't a problem, i have a global BOOL t...

UIImage from UIView to UIViewController

I am creating a UIImage programmatically in my UIView's drawRect function. Is there a way that the UIViewController responsible for this UIView access that image (or a copy of it) for manipulation? Appreciate any pointers and thanks in advance. ...

Landscape view showing when not supposed to

I just want to ask if anybody else is also having problems with this; It used to be that a tabbar app by default didn't allow landscape view unless it was enabled for all views in the app, but one could add [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotateFromInterfaceOrientation) name:@"UIDeviceOrient...

Non-modal iOS keypad interface

Is it known how to get the keypad interface from the Phone and Skype apps? This is distinct from the modal keypad view that appears when a UITextField becomes the first responder. Is this just a UIView that the developers of Skype laid out themselves in IB, complete with custom graphics to get the square shape of each button? Or is ther...

NavigationController: Replacing a pushed UIViewController with another one

Hello, for a better understanding of the following question, here's a little drawing that illustrates the structure of my App: http://grab.by/6jXh So, basically I have a navigation-based App that uses NavigationController's "pushViewController" method to show Views A and B. What I'd like to accomplish is to make a transition from view...

uiviewcontroller concept question

Hi all, Just a short conceptual question: I am making an ap that has a tabviewcontroller on root level. Every tab contains a table with 2 drill down levels and at the end one detail view. What is the approach ? I think a TabBarController that Contains NavigationControllers that contain TableViewControllers ? Is that right ? So far so go...

Should view logic go in a UIView or (when applicable) its UIViewController?

I recently discovered that UIViews should only have UIViewControllers when they fill the entire window (or are managed by another UIViewController such as a UINavigationController or UISplitViewController). This quotation is from the documentation for UIViewController: You should not use view controllers to manage views that fill only ...