uiview

Present a UIView over a view

How can I make a custom view in iOS which appears above the existing view,but smaller? It should be like UIAlertView, but taken from a .xib file. After user taps a certain button, the small view vanishes and the normal view appears. If this is posiible, how can I do it? And.. if it's not hard for you, please, include code. Thanks in ad...

Why masksToBounds = YES prevents CALayer shadow?

With the following snippet, I'm adding a drop shadow effect to one my UIView. Which works pretty well. But as soon as I set the view's masksToBounds property to YES. The drop shadow effect isn't rendered any more. self.myView.layer.shadowColor = [[UIColor blackColor] CGColor]; self.myView.layer.shadowOpacity = 1.0; self.myView.layer.sha...

When to release a UIView that is removed from superview

I am creating a loading screen UIView which is added to a subview while some XML is parsed from some URL. Once the XML is returned, the loading screen is removed from its superview. The question I have is how should I release this object? In the code below, you'll see that I send removeFromSuperview to the loadingScreen, but I still h...

UIView cancel animation

I currently have a view animating from one part of the screen to another. I want the animation to pause whenever the "pause" button is pressed. This means the animation needs to remain right where it is (frame location) when I "pause" the animation. I've tried a few things but nothing has given me the result I want. Below is a rough vers...

display loading

Hey there, I'd like to display a UIActivityView in a rounded transparent box with text, just like the one shown below. Does anyone know how to do this? p.s. I'd rather not be putting it in an UIAlertView, but I don't know how to do it any other way. Thanks! Tristan ...

Can I "curl down" a page on popViewControllerAnimated?

I can "curl up" a view controller with this code: [UIView beginAnimations:@"animation" context:nil]; [self.navigationController pushViewController:page animated:NO]; [UIView setAnimationDuration:1]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO]; [UIView commitAnimations]...

IPhone UIView - How should a UIViewController handle sizing of a UIView when its size is unknown in advance?

(IPhone newbie question) I've subclassed a UIViewController and a UIView, and created a InitWithFrame for the view. My custom controller uses this to initialize its view, by frame, in its loadView function. I plan to use the controller and view in my code at different places. At times under a navigation controller, toolbar, both, neit...

SplitView Controller Menu Overlay

Hey there guys, I'm trying to create a menu overlay system on top of a split view application for the iPad. The menu overlay systems is suppose to support a few buttons, one of which will make the overlay disappear and show the SplitViewController. My application delegate is as follows: UIView *view = [[UIView alloc] init]; [view add...

iPhone SDK - Show image until background task finish

Hello, How can I go about adding a view that appears until the background task finishes (the task in question populates a view and takes ~5 seconds). Thanks, ...

Can't set cornerRadius AND shadow on layer that has an image view stretched to its bounds?

This is stumping me. I have a UIView (call it "parent"). The bottommost subview of that view is a UIImageView (call it "child"), whose frame occupies the entirety of the "parent" bounds. I want to round the corners on the "parent" view, and set a drop shadow. I do this on the CALayer of "parent" as usual: [[parent layer] setShadowOffse...

Present UIView on top of UITabBar

I am drawing a custom view (UIDatePicker) over my table view which is nested within a UITabBarController. When I add my custom view as below, it gets clipped by the tab bar. [self.view addSubview:customDateView]; Does anyone have a recommendation on how to go around this? Can I hide the tab bar? Thanks in advance, Ricky. ...

Working with UITextField

Hi, I am using UITextField to get login and password from a user and then i use web service to send XML file using SOAP to a site and after successful authentication the user logs in and another screen is displayed. The next screen has a button to redirect to the previous screen where user can again enter login and password. I enter lo...

How can I add a UISearchDisplayController to a UIView?

How can I add a UISearchDisplayController to a UIView? Interface builder won't let me. ...

Problem positioning banner on top of my UITableView

I want to be able to display an ADBannerView right above my UITabBar (which displays a UITableView). Unfortunately my banner is not positioning correctly. It will appear right below the UITableView, and then as soon as I scroll, the banner will remain in the middle of my UITableView. I want the banner to appear right above the UITabBar,...

How do you display a spreadsheet-like table in an iPhone view?

I need to display a spreadsheet in a view. There's no need to edit the cells of the spreadsheet, and the spreadsheet will consistently have the same number of rows and columns. (The spreadsheet cells will be populated with financial figures generated by the user in a different view) How would I do this? A UITableView seems inadequate, ...

Changing iPad orientation, rotating statusbar, toolbars, but not the main view

Hello, I’m trying to set up an iPad test application, window-based, where I have a single view controller and a single view. When I rotate the iPad, I want the orientation of the toolbar to change, but not that of the view itself. For example, a sort of background view that you work in is fixed to the device, but the status bar and tool...

How to properly switch UIViews

I want to have multiple views in my application that I switch between. What is the proper way to switch between UIViews that also supports UISplitViewController? Is there a support way to switch or are Apple's controller classes designed to be root and root only? I've tried having one root view and root controller and swap subviews in ...

UITableView won't scroll to certain position

[self.tableView setContentOffset:CGPointMake(0,48) animated:NO]; I have a UITableView that has a a UIView in the header. My UITableView won't scroll to (0,48) unless animated: YES. I don't want it to animate. Anyone know whats up? ...

UIView Being resized for no reason

Ok, here's the setup: -I have my main view controller. -Its one and only subview comes for another view controller that sets its own frame to (0, 0, 1024, 748). -My app is in landscape mode. For some reason, the subview of my main view controller is being resized to something like (0, 0, 1280, 400) somewhere between after its initia...

How do I get my UIView to redraw while the user is scrolling a UIScrollView?

I have a root UIView with two subviews: a custom UIView subclass a UIScrollView The custom UIView subclass has some state that is updated by an NSTimer that fires every N seconds. When the view's state is updated, the view calls [self setNeedsDisplay], which triggers a redraw shortly thereafter. This all works as expected. However, ...