uiview

Preload UIView To Minimize Delay While Running Iphone App

I have an iphone app that has one view that needs to fetch a lot of data off of a variety of internet sites. Therefore, the amount of time required for it to load is unacceptable. I was wondering if there is any way to load the view during the 'applicationDidFinishLaunching' method so the delay is at the startup of the app instead of m...

Image from UIView

Hi, is there any Possibility to create a image out of a UIView? Thanks, Andreas ...

iPhone SDK basics, one view available from several classes.

I'm curious if it's possible to create an application according to window-based pattern, add UILabel, create a new class, and to be able to change UILabel's value from this new class. After creating all that files we will have: NewApplicationDelegate.h, .m; Newclass.h, .m; MainWindow.xib. The IBOutlet in this case must be added to...

How to make a pseudo-alertview with a nib?

I want to put on the screen a pseudo-UIAlertView which is just a UIView plus buttons in a nib I've created with IB.... what's the best way of doing this? ...

autoresizingMask for fixed margin sizes

In a view containing several subviews, one of the subviews should remain a fixed, non-zero distance from the top and bottom of the superview. In these images, this view is shown in gray: According to the documentation, this view should have a mask of UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth. However, this c...

Should the View in MVC have its own class?

I'm a bit confused about the MVC paradigm in relation to iPhone development. Currently, I'm splitting the app into: Model (FooModel.h, FooModel.m) View (FooView.xib) Controller (FooController.h, FooController.m) But should I instead use for the View a subclass of UIView (FooView.h, FooView.m)..? It's just a simple game app. ...

MPMediaPickerController in one view and the MPMediaPlayback in another view. How to?

Basically I have a three view stack. In the last view I got a MPMediaPickerController that lets the user pick a song from his/her library. The song is to be played later from the first view. How can I tell the player (in the first view) what should be played? One possibility would be to send a notification and include the MPMediaItemCol...

flipping UIViews ???

i am using the following code to flip between two UIViews.. - (IBAction)switchView:(id)sender { UIView *mainView =View1.view; UIView *flipsideView =View2.view; [UIView beginAnimations:@"View" context:nil]; [UIView setAnimationDuration:1.00]; [UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES...

UIVIew animation - Scaling + Translating

Hi, I have a view which I want to be scaled and translated to a new location by animating it. I tried to achieve it with the following code: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:kDurationForFullScreenAnimation]; [[self animatingView] setFrame:finalRect]; [UIView commitAnimations]; The effect of this ...

UIView beginanimations: subview shall not animate

Hi I have a UIView to which I add a UIButton in its initWithFrame: method like this: UIButton * dropB = [UIButton buttonWithType:UIButtonTypeRoundedRect]; dropB.frame = CGRectMake(190, 22, 52, 22); dropB.backgroundColor = [UIColor clearColor]; dropB.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:11]; [dropB setTitle:@"DRO...

What is the best method for creating a layer to catch touch events?

I need to put up an info screen above the main interface, but I need it to be alpha'd so you can see the interface underneath it. However, when I touch across the screen, the interface underneath is still running. What is the best method for intercepting the touch events so they don't pass through? I tried to add a custom UIButton the s...

Animated UIView frame change causes short flash of previous content before re rendering

I've got several UIViews that have a layer class of CATiledLayer because they need to be zoomed using UIScrollViews. I use Quartz to render some PDF pages inside said UIViews. Everything is fine until I try to animate said views frames on page rotation. The animation is fine, the contents of the view gets scaled quickly and cheaply to m...

UITabBarController with portrait / landscape views

I have a subclass of UITabBarController which i am using so that i can rotate to use my app in landscape too. How would i go about rotating my UI and getting each view controller to use a landscape view xib? I have always just written apps before where returning YES for shouldAutorotate... handles it automatically for me... this isn't ...

Adding a simple UIView from a class to the main ViewController

Dear scholars, code gurus. My question is rather simple, I have been searching and trying for some time now without any luck, I would greatly appreciate some tiny help. I have a simple class that should generate a view as following: // vipcardclass.h // #import <UIKit/UIKit.h> @interface vipcardclass : UIViewController { } +(IBA...

How can I resize a UITableView header?

self.headerView.frame = CGRectMake(0, 0, 320, 167); //this is a UIView doesnt seem to do anything. everything is hooked up in IB. ...

How can I use a single UIToolbar with multiple different UIViewControllers?

I have a simple app with two basic screens, a UIMapView and a UITableView. I'd like to have a toolbar at the bottom with a couple of buttons and a UISegmentedControl with two segments: "Map" and "Table". (The layout is similar to the Google Maps app that ships with the iPhone.) How can I keep the same toolbar while presenting either the ...

iPhone programming problem about UIView and UIViewController

I am a newbie in iphone dev, and I am confused by UIViewController. most program start with a view controller, but I don't know why we need it. ViewController has a view, but you cannot use the drawRect medthod. So why not just use View instead of ViewController in places like UIWindow and so on? I learned that to initialize a View, yo...

How can I forward touches to a UIButton from another UIView?

I have a UIButton and a UIView. The View sits above the button, and is larger than the button in size. The view itself is what I want to have accept the touch events, and I'd like to forward them to the button, so that all the normal button visual changes on touch happen. I can't seem to make this work-- my UIView implements touchesBeg...

Is it ok to autorelease UIViewControllers?

I have some view controllers: StockTwitsTVViewController* stvViewController = [[[StockTwitsTVViewController alloc] initWithNibName:@"StockTwitsTVViewController" bundle:nil]autorelease]; UINavigationController *stvNavController = [[UINavigationController alloc] initWithRootViewController:stvViewController]; stvNavController.tabBa...

In MonoTouch, how do I assign a custom view to my view controller?

If I want to use a custom view object with my view controller, instead of just using the one that's initialized by default, can I just assign it to the view controller's View property. For example, is the following the correct/safe approach? public class MyView : UIView { } public class MyController : UIViewController { // Construc...