uiview

Setting a rotation transformation to a UIView or its layer doesn't seem to work?

I'm trying to have one of the children views in my screen (owned by one view controller) not rotate when the device rotates. My view controller allows rotations as it should, and I'm trying to apply a 90-degree rotation to the one "stationary" view to counteract the overall rotation. Problem is, everything seems to rotate anyways, and t...

iPhone SDK: Have UIView over camera display

How can I have a UIView over a view that contains a live view from the camera? ...

uiwebview to uiview

Hi, When i click a link in the uiwebview is that possible to load a uiview ? Is there a way to transfer control from uiwebview to uiview. ...

how to execute multiple animations in a row?

-(ibaction)sometouched:(id)sender { [UIView beginAnimations:@"first one" context:nil]; [UIView setAnimationDuration:1.0]; [myview setFrame:CGRectMake(0,y,width.height.); [UIView commitAnimations]; [UIView beginAnimations:@"second one" context:nil]; [UIView setAnimationDuration:1.0]; [myview setFrame:CGRectMak...

iPhone: Is it possible to have an 'info'-button in all views in my app?

Hi, As mentioned in the title, how do I implement such a functionality? I am using the code below, (in my viewDidLoad), to get the button on my Navigation Controller of my main view. UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight]; [infoButton addTarget:self action:@selector(viewWillAppear:) forControlEvents:UI...

iPhone - subview stacking slowing down application?

Hi, As title says, I'm wondering if stacking subviews can slow down an iPhone application. For example, I have a UIViewController, which has a view occupying the whole screen. When the user presses a button, I create a second view controller and add its view as a subview of the original VC, making the second view completely hide the fi...

Dynamic UIViews in Obj-c + Cocoa touch

Hi guys, I need a way of creating a UIView dynamically. Thus, the parent class could look for say a count of array items, and create UIViews on the fly of the amount of items in the array. The views need to be allocated dynamically, do I can't create them on the fly. Can you help? ...

How can I modify an existing UIViewController to allow scrolling?

I have already built a UIViewController subclass with a bunch of controls in it, and just realized that if I rotate the iPhone, half of the controls become invisible. So, I would like to somehow make the UIViewController's UIView scrollable so that when the device (or the Simulator) rotates, the user can scroll the view to see all the co...

Cache UIView on drive?!

Hi, does anyone know if it's possible to cache the entire UIView on a drive not in memory so you don't have to regenerate the entire content everytime you want to access it ... Right now I am preloading three pages on both sides in scroll view but it would be nice to pregenerate the entire edition in background and store it in documents ...

Need to create a snapshot of a view at runtime...

Hi, i need to take a snapshot of my current ipad-view. That view loads and plays a video. I found this function which works almost really well. - (UIImage*)captureView:(UIView *)view { CGRect rect = [[UIScreen mainScreen] bounds]; UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentCont...

Touch Gesture on a CALayer

I am doing some drawing on a CALayer and want to be able to have the user single tap different parts of the drawing and trigger a response. I tried looking into gesture recognizers, and it seems that they need to be tied to a UIView. Any idea how I can get my desired behavior using CALayers? ...

Possible to initiate a call to 'shouldAutorotateInterfaceOrientation' of a UIViewController

Hi all! Again a question about changing the interfaceOrientation of a UIView. The probleme that I have is changing the interfaceOrientation and I would like to avoid to do it manually, because I additionally have hidden views (those will appear with certain finder swipes) and I think it's a little bit tricky to transform all of them man...

Objective-c animation block doesn't seem to fire

I have a method in my UIView subclass "Card" to dismiss an instance by fading its alpha from 1 to 0. I do a similar thing when I add the card to the superview and it fades in fine. But when I call fadeAway, it just disappears immediately. The presentation code is in my controller class. Here is my Card.h and Card.m #import <UIKit/...

loadView is called each time .view notation is used

I have a view called MyViewController, that I initialize from a xib file. Its loadView method looks like this: - (void) loadView { [super loadView]; // some initializations } I create it from some other view controller like this -(void) createMyViewController { MyViewController *aController = [[MyViewController alloc...

Using objects in an NSArray

Hey I have these UIView objects in a dictionary I have created as such: - (NSArray *)createNumberOfViews:(NSInteger)number { NSMutableArray *viewArray = [NSMutableArray array]; for(NSInteger i = 0; i < number; i++) { UIView *view = [[UIView alloc] init]; // any setup you want to do would go here, e.g.: // view.backgroundColo...

Is it possible to receive UITapGestureRecognizer calls in 2 classes at the same time.

I want to call an action in two classes (a superview and a full screen subview) when the user single taps the screen. But, when I add a UITapGestureRecognizer to the subview, the one added to the superview is overridden. Is it possible to add a UITapGestureRecognizer to a subview without overriding the UITapGestureRecognizer added to the...

iPad app UI design questions

The interface of my iPad app has multiple section boxes (looks similar to this stackoverflow page). I'm new to xcode and iOS programming but have years of web development experience. I would like to know what is the best way to design this. Should I put everything in one xib file? (section1headerlabel, section1text1,section1text2..) ...

How to programmatically add text to a UIView

I have a UIView that I'd like to add several bits of text to. I have used a UITextView but I think that's overkill as it doesn't need to be editable. I thought about using a UILabel or a UITextField, but I don't see how you tell the superview where to position the UILabel or UITextField within itself. I want the lowest footprint objec...

CATransition how to clip to bounds of UIView?

I'm using CATransition to slide subviews of UIView. But the problem is that the CATransition always appears in whole screen. And it looks like a mess because I have another UI elements in window that become overlapped while transitioning. How can I restrict frame of transition by UIView frame? I tried to set clipToBounds of my UIView to ...

don't allow subviews to scale vwith view?

hi all i am scaling UIView using [UIView setTransform:CGAffineTransformMakeScale(2.0*scale.value, 2.0*scale.value)]; its works fine for me but all subviews are also scale with the UIView, but i don't want to scale all subviews of that UIView. i tried following this to stop scale subviews. [UIView setAutoresizesSubviews:NO]; UIVi...