uiview

How to get background image from UITableViewStyleGrouped for any UIView?

Hi, I would like to have a UIView with the same background as a UITableView with the UITableViewStyleGrouped style (its that grey-white pattern seen in the Settings App, for example). Is this possible? Thanks in advance MrMage ...

iPhone Dev - UIView frame and loadView

I'm learning to develop for iPhone (programmatically, I don't like IB). I only use IB for the frames of things, so I design in IB but only use it to check each control's frame. Something I've gotten very confused about is the frame of a UIView. First of all, if you do not implement loadView in a view controller, it automatically creates ...

Can you override a parent UIView's alpha value on one of its subviews?

I have a somewhat transparent view (alpha = 0.6) that has some subviews. I'd like one of the subviews (a UILabel) to be drawn with alpha of 1.0 because the blending makes the text difficult to read but by adding it as a subview of the main view it has adopted its parent's alpha value. Is there a way to override this behavior? I believe I...

Does anyone have the UIViewAdditions file from WWDC 2009 session 128?

Hopefully without violating any NDA, here is my question: I have been reviewing the WWDC session on prototyping, and I've gotten stuck on whatever we weren't shown that is in the UIViewAdditions file. Can anyone point me in the right direction to find the code from that file? ...

Managing subviews in Cocoa Touch

Hi, I'm developing an iPhone app. I need to create a Quiz application that has different Question views embedded in it (see my similar question). Different types of Question will have different behavior, so I plan to create a controller class for each type of Question. The MultipleChoiceQuestionController would set up a question and 3-...

iPhone Dev - Autorotating all views

(By the way I develop without Interface Builder) If you have a tab bar app that autorotates, so all the autoresizing masks are set, how do you make it work with all the views? Like if one view autorotates to landscape, you select a different tab in the tab bar, and the view associated with that tab comes up, and its all messed because it...

How to open a new view when touching on a uiview?

i have a scrollview with uiview added as subview..now how do i open a new view when i touch on the view???? i want a new view to appear...before this i have buttons on my view...so button have the method "addtarget perform selector"...from that i am loading a new view here is an image of my view ...

How does a UIView know about an added subview's UIViewController?

in the case of say - (void)applicationDidFinishLaunching:(UIApplication *)application { ... [window addSubview:gameController.view]; ... } how does the view of gameController retain association to gameController? I've peaked through all of the Debugger variables and I see no association other than a boolean flag that it belongs to...

How to get touch coordinates REGARDLESS of what "view" I may have touched?

In my ViewController, I have a UITableView with some custom cells in it. When I touch a cell I want to get the touch coordinates right there into my UIViewController. The problem is, I can only get coordinates from parts of the screen not occupied by the UITableView..., Whenever my touch falls in the parts of the screen with the UITableV...

How does Interface Builder know about UIViewController's view?

UIViewController has an ivar (and @property) called view. It is not however, an IBOutlet. When creating a view nib in Interface Builder, you typically set File's Owner to be your UIViewController (or subclass thereof), and you wire the nib's view to File's Owner's view outlet. How does this work if the UIViewController view member isn'...

Non scrolling tableViewHeader

First a little background info: I have UIViewController that contains a UITableView. In the loadView method (after initialization of the table), I set the UIViewControllers view to the table view with: self.view = tableView; What I want is a view on the top of the screen (before the UITableView), that doesn't scroll with the rest of th...

Can I use an EAGLView in my UIViewController?

I have a UIViewController that instantiates several UIImageViews on the screen. Is it possible to instantiate an EAGLView (like the one in the OpenGL ES template in the iPhone SDK) in a similar manner in my View Controller, and possibly have the UIImageViews as well as an EAGLView all running simultaneously on the same screen? ...

How to prevent drawings to a UIView context from dissappearing?

I'd like to create a simple fingerpainting feature in my app. Problem is any drawings I do to my UIView subclass view instance are erased after each drawRect call... How do you go about preserving your context drawings in your UIViews? ...

iPhone dev - In didReceiveMemoryWarning or every time

In a multi-view application, do you think its better to let views automatically get unloaded in memory tight situations, or to actually only ever have one View Controller allocated at a time, and when you switch views, the new one is created, the old one removed, the new one adde d and the old one released. Deallocating every time also m...

key-value-coding a UIView's ivars

I'm interested in running some methods when my UIView is changed, either through a frame change or an affine transformation. My best idea is to do this by observing value changes for: myView.frame and myView.transform. However, the view portion of UIViews is not Key-Value complaint. Fortunatly the model portion of the view, the CAL...

Conditions when drawRect's rect != self.frame

I have a UIView subclass that I am doing some custom drawing in. When drawRect:(CGRect)rect is getting called rect.size is either (64, 63) or (63, 64); self.frame.size is (64, 64). I have multiple instances of this subclass, most of which get the expected (64, 64) size for the drawRect parameter. What are conditions that may cause some...

Add A view with Dissolve effect in iPhone

FlipView *fl=[[FlipView alloc] initWithNibName:@"FlipView" bundle:nil]; //fl.view.frame=CGRectMake(50.0,50.0, 300.0,300.0); fl.delegate=self; fl.modalTransitionStyle=UIModalTransitionStyleCrossDissolve; fl.imageName=aCategoryDtl.Tip_Image; [self presentModalViewController:fl animated:YES]; In above code, A Complete New View Controller...

Embedding WebView in UIView

Hi All, I'm trying to embed a WebView inside a UIView/TableView so as to implement the combobox. The WebView will have the select element , after the selection the value should be returned to the main UIView. I'm not sure how to implement this. In the ViewDidFinishLoad, I try to run the JavaScript like this: - (void)webViewDidFinishLoa...

Setting the size of a UIView

Hi there, I have a UIViewController subclass to control a UIView that I want to add to a UIScrollView. I only want the view to be 100px high, but when I add it to the scroll view it gets made 460px high, ignoring the frame size I set: MyViewController *vc = [[MyViewController alloc] init]; vc.view.frame = CGRectMake(0, 0, 320, 100); my...

Animating a UIView To A CGPoint

Hi Everyone: I am wondering how I would go about animating a UIView's to a specific CGPoint. The following is what I have so far (which doesn't work in it's current state): #define MOVE_ANIMATION_DURATION_SECONDS 2 NSValue *pointValue = [[NSValue valueWithCGPoint:point] retain]; [UIView beginAnimations:nil context:pointValue]; [UIVie...