uiview

Transform coordinates to find CGPoint after scale and move on UIView

Hi I have a UIView with a world map. This is added to a parent UIView, this parent UIView also has two markers build from UIViews. The markers are placed in the center of two arbitrary countries. Now I find the midpoint between these two markers moves the world map view so that this midpoint is at the center of the screen, I then conti...

Unable to load a UIView in a separate ViewController with an NSObject

Hi all, The app is a viewbased project type. I am using a NSObject in a View XIB(UIView Nib), assume this object to be the topbar of the app. MainController UIViewController loads the initial screen. it looks like this, UIViewController MainViewController Image i wanted to load a Top view(new one, call it X) Designed separately in t...

UIView Autoresizing Resources

I've been working on autoresizing a custom UIView and Apple has very little to say on this. What's more, based on SO feedback, Apple's documentation is actually wrong in some areas. Finally, even though there are six resizing components in Interface Builder and six for setAutoresizingMask: they don't seem to correlate at all. For example...

view all the subclass of UIView or NSObject

You can view the Java API in tree structure. So you can view all the subclasses of Object. How would I view all the subclasses of UIView or NSObject IPhone Cocoa API? I just found out you can do this: self.tableView.tableHeaderView = searchBar; searchBar is subclass of UIView. I want to add a textField to a tableView. I wonder if ...

UIView duplicate

Hi! I need to duplicate a view, with all it's subviews. Does anyone knows how to do it? Thanks in advance! ...

Need advise about loading screen on iPhone

could you show me some algorithm or example code to display like that picture with or with out animation thanks for all advise ...

Trying to fade in a UIView without success

Hi there. I am trying to fade in a UIView as a subview of my main view. The UIView I am trying to fade in has the dimensions of 320x55. I setup the view and a timer; secondView.frame = CGRectMake(0, 361, 320, 55); secondView.alpha = 0.0; [self.view addSubview:secondView]; [NSTimer scheduledTimerWithTimeInterval:.5 target:self selector...

Iphone View explanation in detail (View, Superview, etc)

Hey, I'm looking for an in-depth breakdown/explanation of the iphone's view usage. Like, what controllers have what types of views, how they relate (child <> parent), how they can be nested, added and removed, etc. Preferably something with some pictures would be nice too (I'm a visual learner). But yeah, in-depth, technical, explana...

Is there a way to get a position (or center) state from a unfinished UIView animation?

I have a UIView doing a simple animation. It adjusts its y position from 100 to 130 and then reverses. I want it to keep repeating so I have the repeat counter set to 999. Upon user input, I want to take the same UIView and adjust the x position. This is done by means of another UIView animation. The problem is that when the 2nd ani...

How come some of my UIViews are shifted after navigation?

In some of my application designs or for just some UIViews, following a navigationController's pushViewController, my new view will be shifted off the window by the height of the status bar. As a result, I will put this code stub in the viewDidLoad method. CGRect frameAt = [self.view frame]; CGRect statusBarFrame = [[UIApplication sh...

uiview animation threading issue

i am using two UIView animations to move the two different balls to particular position. But the timing of collision varies. First time they collide but second time first ball come first or viceversa. Can any buddy explain how to make them collide at same point using uiview animation. is it the thread processing issue of uiview animation...

How to detect when a UIView has changed size?

Hi, I have a UIViewController that is initialised with a correct frame, however somewhere in my code the frame gets mangled and I'm having difficulty finding out where. In situations like this it is usually handy to watch a variable in the debugger, however I have no way of accessing the controller->view->frame property in my variable ...

Updating/Removing UILables from View

hi, i'm creating some UILabels in my UIView, filling them with data, adding them to view and releasing them UILabel *speed = [self scrollLabel:@"some Text" x:455.0f y:75.0f]; [scrollView addSubview:speed]; [speed release]; the method: - (UILabel *)scrollLabel:(NSString *)text x:(float)x_ y:(float)y_ { UILabel *label = [[UILabel al...

Why isn't removeFromSuperview hiding my UIView in my iPhone application?

I'm new to iPhone development and am having problems removing a sub-view from the main window. The problem is that the view still shows up even after calling removeFromSuperview. The sub-view is created and added to the display tree through this code: // Instantiate the controller for the authentication view AuthenticationController...

iPhone - refreshing UIView with overridden drawRect and viewDidAppear

I have a written a tab-based application, which pulls data from an NSMutableArray, and graphs it in one view of a tab-based application. This works well the first time the view is viewed, but after this, the view does not refresh when it is viewed. I have overridden the viewDidLoad method in the viewController, but it does not seem to ...

Moving a UIView containing UIButtons makes those buttons stop respond to taps

I have a UIView in a UIScrollView in a UIView in a .xib that contains several buttons. If I move that UIView down by several pixels from within viewWillAppear, the buttons all stop responding to taps. Here's the code I'm using to resize the UIScrollView and shift the buttons down: // adjust the view height to accomodate the resize...

How to set background image of a view?

Hi All! I am a beginner at Obj-C/Cocoa Touch/iPhone OS. I wish to have a background for my app with different images everytime the the view is called. Say I have 10 images. I 've used it like this: //random image generation NSString* imageName; int aRandomNumber = arc4random() % 10; imageName =[NSString stringWithFormat:@"g%d.jpg",aR...

UIView inside UIView with Shadow?

Hi, I've been trying to figure out how to draw a shadow for an UIView that was added inside a UIView with addSubview. I searched online and read the docs, but the Apple docs simply draw new shapes as shown below. I want to use the Core Graphics to add a shadow to the UIView, but am unsure how to do this to a UIView directly. CGContex...

iPhone: Flipping View like the Weather App?

Can someone advise the codes or similar codes for the iPhone weather page, when you touch the little circled (i) the right, bottom corner, it flips the page. Thanks. ...

How to get the "dashboard" ripple-effect and closing-effect for UIViews?

My project add a UIView with a button press. Is it possible to get the dashboard ripple-effect when the subview is added to the view? Also the subview can be closed with: removeFromSuperview. How can I get the closing effect of a dashboard widget (when you press on the x). ...