uiview

Efficiency of create views programmatically vs IB

I have a large number of UIViews that are created in the app delegate applicationDidFinishLaunching and added to an NSMutableArray. The user pages through these views using a page control and scroll view. I created the UIView and its child components in IB. They are wired to a controller. To create 170 views on the iPhone takes about...

UIViewController -viewDidLoad not being called.

As a Cocoa noob, I'm having a few issues with Interface Builder, UIViewController and friends. I have a UIViewController subclass with a UIView defined in a xib, and with the controller's view outlet connected to the view. The xib's "file's owner" is set as my controller subclass. In this one instance, the following code to load the co...

Empty UIView with minimal drawRect: overhead

Hi, I have an application that has three nested views that are mechanically important, but have no visual elements: A vanila UIView that doesn't have any content of its own, and is simply used as a host for CALayers. A UIScrollView (that is queried for it's origin and used to position CALayers in 3d: I really only use this view to fai...

UIPickerView not appearing until touch occurs

I'm programatically adding two custom UIPickerViews to another view (MainView). They work just fine but they are not visible until a touch event occurs in any part of the MainView. I've checked the class references for UIPickerView and UIView but haven't found anything that manages to "refresh" the view, unless I'm missing something obvi...

Adding UITextView as subview in UIView then to UIScrollView

I have a UIViewController (ContentViewController ) wired to a View xib. I drop a TextView on the UIView and it appears as a subview in the hierarchy in IB. ContentViewController has a label as an outlet, which is wired to a label on ContentView.xib. When the code below executes, the first view shows the text view but scrolling through...

Iphone SDK - Animating Subview

I have a View that has a UIWebView, and an OptionsPane (Custom UIViewController with Custom view). I want when the view is shown, for the options pane (located on the top of the main view) to FLIP into place. I am using the code, and I am getting a strange result. The FIRST time the view is shown, the options pane seems to already be v...

tableViewHeader rejecting multiple sub-views...

The tableViewHeader property of UITableView is a UIView so I thought I would be able to add multiple sub-views to it. However, when I added the code for the segmented control the UILabel a few lines before it doesn't draw. Rects shouldn't be overlaping each other. What am I doing wrong? - (void)viewDidLoad { [super viewDidLoad]; CGR...

UINavigationController NIB requires File's Owner to have a view?

I'm having a problem setting a View Controller nib's default View Outlet in Interface Builder. Here's my setup: I have a TabBar based application where I load a Navigation Controller as a modal view... MyNavCtrlrSubClass *menu = [[MyNavCtrlrSubClass alloc]initWithNibName:@"MenuController" bundle:nil]; [tabBarController presentModalView...

Is there a way to detect what UIView is currently visible?

I have a class that communicates with a web service and is used throughout the app. What I am looking for is a way to display an Error message in a UIActionSheet on top of what ever view the user is in. Is there an easy way to do this? I would like to avoid call back methods in every view if at all possible. ...

Drawing a shadow below a UIScrollView (that scrolls a UIView)

My setup is a UIScrollView in the center of the screen (on the iPhone - like 300x400 positioned in the center) that contains a UIView of the same width, so it scrolls it vertically. In this UIView i draw custom subviews with labels etc (it's a scoreboard with various colors). What i'd like to have is some shadow below my UIScrollView, s...

fill UIView with large sized text on the iPhone in Landscape

Hi, I have put my iPhone app in landscape mode and I want to put a message in one of my views that fills the screen. As of now a 6, 10 or 12 character message only goes up to about 12 point font in portrait view in interface builder. When I build and the iPhone simulator switches to landscape the font size stays the same as in portrait...

Switch single view based application view on iPhone

Hi, I have a simple view based application. I want to switch this original view for another view when I push a button on the original view. I do not want to use a navigationviewcontroller, or switchviewcontroller, I simply want to swap the root view for another. Thanks, Joe ...

switch between uiviews with buttons and not uinavigation controllers

I have seen the post for http://stackoverflow.com/questions/584892/how-to-switch-views-by-buttons-on-iphone but this doesn't answer how to switch back and forth between views with buttons. The person that asked the question settled on the answer that they could switch between views with uinavigationcontroller. I put the following code...

Autorotation of UIViewController works only when view is added in specific order

Hello together I'm trying to add rotation support to our application which we are currently developing. Unfortunately its not working. So I created a small test project to test what the reason could be. And I found a strange behavior which I cannot explain. In my test project I have two RotationTestViewController (extended from UINavi...

iPhone Flipside Template (Utility Application): Where did the view come from ?

When I start a project with the Utility Application Template (which has a flipview), I get 3 .xib files. When I open the "MainWindow.xib", I get two rectangular pieces. One of them represents the window. The other is called RootViewController. This has a view in it. My question is : 1) How is this view represented, because there is n...

How to Display ngmoco's Fireworks App Over a UIImageView?

Tim Omernick from ngmoco recently gave a talk at Stanford and demonstrated an interesting fireworks app for the iPhone that he posted up the code for here: gamemakers.ngmoco.com/post/111712416/stanford-university-and-apple-were-kind-enough-to I can get the app to run when I specify the EAGLView's parent class as a UIView in its header ...

How to retain or animate subview background color in UITableViewCell on selection?

I have a UIView as a subview of a custom subclass of UITableViewCell. I'm using it to change the color of just a small area of the cell dynamically. When I select the cell, the background color of the entire cell -- including the background color of the subview -- is changed to blue. That's fine, it happens instantaneously. Selection...

MVC: Where to load views?

Hi, I have a relatively simple app. I have a fullscreen UIView subclass (musicGridView) that the user interacts with, and a UIScrollView subclass (scrollView) that loads this class in, as well as a ViewController and mainWindow.xib. Right now, I have a viewController instance loaded in the nib, which is of type myViewController. ...

Spawning multiple instances of the same UIImageView

I have a UIImageView that I created in the nib builder and was wondering how I would create multiple instances of this same ImageView ? Right now that imageview has code attached to it, so it can move around the screen randomly but I want more than one to spawn in the middle of the screen every few seconds. ...

Should Views be created using NIB's or code in iPhone

Is there any performance, development drawbacks or advantages when designing Views using Interface Builder? ...