UIView is an iOS class which is used to display all user interface elements. All UI elements are either subclasses of UIView or are contained within a UIView.

learn more… | top users | synonyms

117
votes
8answers
171k views

iPhone UIView Animation Best Practice

What is considered best practice for animating view transitions on the iPhone? For example, the ViewTransitions sample project from apple uses code like: CATransition *applicationLoadViewIn = ...
57
votes
5answers
28k views

Rounded UIView using CALayers - only some corners - How?

In my application - there are four buttons named as follows. Top - left Bottom - left Top - right Bottom - right Above this buttons there is an image view / or we can use also UIView. Now, ...
119
votes
4answers
29k views

How to tell if UIViewController's view is visible

I have a tabbar application, with many views. Is there a way to know if a particular UIViewController is currently visible from within the UIViewController? (looking for a property)
66
votes
15answers
42k views

Get to UIViewController from UIView on iPhone?

Is there a built-in way to get from a UIView to its UIViewController? I know you can get from UIViewController to its UIView via [self view] but I was wondering if there is a reverse reference?
43
votes
3answers
14k views

Changing my CALayer's anchorPoint moves the view

I want to alter the anchorPoint, but keep the view in the same place. I've tried NSLog-ing self.layer.position and self.center and they both stay the same regardless of changes to the anchorPoint. Yet ...
157
votes
3answers
41k views

Cocoa: What's the Difference between the frame and the bounds?

UIView and its subclasses all have the properties frame and bounds. What's the difference? (Please don't quote the Apple docs, I've already read them and did not understand)
54
votes
2answers
33k views

UIView frame, bounds and center

I would like to know how to use these properties in the right manner. As I understand, frame can be used from the container of the view I am creating. It sets the view position relative to the ...
36
votes
2answers
12k views

How to Convert UIView to PDF within iOS?

There are a lot of resources about how to display a PDF in an App's UIView. What I am working on now is to create a PDF from UIViews. For example, I have a UIView, with subviews like Textviews, ...
45
votes
3answers
37k views

What are block-based animation methods in iPhone OS 4.0?

I am trying to implement a game using the iPhone OS 4.0 (iOS4?) SDK. In the previous versions of the SDK, I've been using the [UIView beginAnimations:context:] and [UIView commitAnimations] to create ...
19
votes
6answers
19k views

Orientation in a UIView added to a UIWindow

I have a UIView which is supposed to cover the whole device (UIWindow) to support an image zoom in/out effect I'm doing using core animation where a user taps a button on a UITableViewCell and I zoom ...
56
votes
2answers
31k views

UIViewController. viewDidLoad vs. viewWillAppear: What is the proper division of labor?

I have always been a bit unclear on the type of tasks that should be assigned to viewDidLoad vs. viewWillAppear: in a UIViewController subclass. For example, I am doing an app where I have a ...
24
votes
6answers
17k views

How Do I Take a Screen Shot of a UIView?

I am wondering how my iPhone app can take a screen shot of a specific UIView as a UIImage. I tried this code but all I get is a blank image. UIGraphicsBeginImageContext(CGSizeMake(320,480)); ...
14
votes
2answers
6k views

Why am I having to manually set my view's frame in viewDidLoad?

I have a pretty basic setup with a UINavigationController inside a UITabBarController. I'm wanting to programmatically layout the view of the rootViewController of that navcontroller, but when I look ...
4
votes
4answers
4k views

How to get UIImage from EAGLView?

I am trying to get a UIImage from what is displayed in my EAGLView. Any suggestions on how to do this?
25
votes
5answers
28k views

What is the most robust way to force a UIView to redraw?

I have a UITableView with a list of items. Selecting an item pushes a viewController that then proceeds to do the following. from method viewDidLoad I fire off a URLRequest for data that is required ...

1 2 3 4 5 53
15 30 50 per page