uiview

How to disable multitouch?

My app has several buttons which trigger different events. The user should NOT be able to hold down several buttons. Anyhow, holding down several buttons crashes the app. And so, I'm trying to disable multi-touch in my app. I've unchecked 'Multiple Touch' in all the xib files, and as far as I can work out, the properties 'multipleTouch...

Multiple Views in One Nib (addSubview)

I'm trying to keep my code clean and keep the number of files down. I am using a UITableViewController and I would like to load another view on top of it. I thought this would be pretty simple: (1) create an IBOutlet in my .h file @interface MyViewController : UITableViewController { ... UIView *downloadView; ... } ... ...

How to change view size in IB for iPhone 3.0

I want to change the view size for iPhone 3.0, but I find that in IB, size&Position section, the Width and Height for view was set as fixed values. Does apple forbid us to change its value here. How can I change its Height then? PS:I use the navigation bar as title bar, so I need to change the height of view to 416 so as to know how muc...

Ignore touches to background (super) view

How should I be handling, or rather NOT handling (ignoring), touches to my background view? It happens to be the view of my View Controller which has subviews (objects) that I DO want to respond to touch events. Setting userInteractionEnabled = NO for the view seems to turn off ALL interaction for the subviews as well. I'm currently te...

Fixed keyboard inside a UIView

Is there a way to include a keyboard inside of a view? I want it to be part of the view and not be dismissed as well. Birdfeedapp does this in it's 'add account' modal view. ...

Where to determine UIView size

Summary: How should the UIViewController know the size of its UIView instance when initializing that view? The dedicated initialization method for an UIView is the initWithFrame:(CGRect)frame method. This sets the frame for the newly created UIView. This method could be called from the UIViewController's loadView method, if that view co...

Can I retain a View while releasing its ViewController?

I'm trying to load a new view into an existing view controller, but I want to load that view from a xib file. My plan was to create a second viewController (viewController1 in the code below), then retain its view and release that viewController that I just created. I was hoping that the viewController would be released and the view woul...

Flipping Subviews above a main view

Hi all - I'm trying to build a subview that sits above my main view that is approximately 3/4 the size of the main view. When a button is pressed, the subview should flip to another subview. I'm close, but am having TWO problems. The first problem is that the first time the flip button is pressed, the second subview starts at full s...

UIWindow and UIView addSubview Question

Does the addSubview method actually load the view into the application or not? The reason I am asking is because I have two two views in my application. The application delegate adds the two views as subviews and then brings one of the views up front. Now, I have a print statement in each of the viewDidLoad methods for each view. When I ...

Resize for in-call status bar?

How can I make my view resize in response to the in-call status bar from my nib? I figured it would just be setting the resize properties, but they're not enabled for the root UIView. (I think my main problem here is I don't know what any of this is called; I can't find any reference to the in-call status bar in any of the documentatio...

View loaded from nib will not update contents of UILabel while running in a method

Hi, I am having an issue with updating the contents of an "myInfoBox" object I created to be displayed while some background processes are done. In the delegate method I am creating a new viewController: -(void)loadMainView { myFirstViewController = [[MyFirstViewController alloc] initWithNibName:@"MyFirstView" bundle:nil]; ...

UIView alpha problem

Hello. I'm having problems setting the alpha value of a UIView subclass object. Any suggestions? I have UIView project whose alpha property I'm manipulating to control brightness. I'm using a UISlider control to set the value of the alpha property in a UIView subclass as follows: -(id)initWithFrame:(CGRect)rect andParent:(id)thePare...

Dynamic Button Layout without hard coding positions

I would like to implement a view (it will actually be going into the footer of a UITableView) that implements 1-3 buttons. I would like the layout of these buttons (and the size of the buttons themselves) to change depending on which ones are showing. An example of almost the exact behavior I would want is at the bottom of the Info scree...

Switch between 3 or more views

Hello Im new to iPhone development and I have really taken this to me. I love it, but there is one thing thats naggin' me. How do I keep switching view? I know how to come from first view that is given to me when I create a new project, to a view that I make, but how do I get passed this two windows? How do I get from to views that I cr...

iPhone custom UIView bounds

I am trying to create a custom UIView that is stored in a nib so that I can position it using Interface Builder. I have created a class called RippleView that extends UIView. I'd like to position this view as a subview using Interface Builder. To do so, I've dragged a new view into my existing view in Interface Builder and gave it the R...

Fitting Cocoa Animation into MVC/OOP patterns

MVC/OOP design patterns say you don't set a property, per se, you ask an object to set its property. Similarly, in Cocoa you don't tell an object when to draw itself. Your object's code has detailed HOW it will draw itself so we trust the frameworks to decide when (for the most part) it should draw. But, when it comes to animation in C...

Does moving a view to new superview automatically release it from old superview?

It's not clear, to me anyway, if a UIView is automatically released from its superview if you use addSubview to add it to another view?!? I know a view can only have ONE superview but I'm not clear about how, exactly, to go about moving a subview from one superview to another. retain view, release (from old superview), addSubview to new...

How can I move around and slide away a UIView with touches and swipes?

Hello, I´m trying to animate a sort of draggable UIView where the behaviour should be something like this: Drag along the screen following the touch of the user. Detect a swipe touch and drag automatically with an initial speed and a negative acceleration that makes is stop after some time. Something like moving around a photo and th...

UIView animation vs CALayers on iPhone

I'm struggling with conceptualizing animations with a CALayer as opposed to UIView's own animation methods. Throw "Core Animation" into this and, well, maybe someone can articulate these concepts from a high level so I can better visualize what's happening and why I'd want to migrate UIView animations (which I'm quite familiar with now) ...

passing handles between a ViewController and a View

I have an array of booleans (soundArray) that is modified based on user input. Therefore it is owned by the main UIView that the user is interacting with. Meanwhile, in another separate controller (GestureController), I need access to this soundArray, so I can pass it as a parameter in a method call. I'm pretty sure a ViewControlle...