uiview

Add buttons under a tableview

Hello, I'm trying to create a view programmatically. The result that i want to have is a scroll view with a tableview inside. And under this table view i want to add some buttons I don't know exactly how to do that i tried this but it doesn't work : - (void)loadView { [super loadView]; tableView = [[UITableView alloc] initWit...

UIView and UIViewController practice for inheritance

Hi, I was just wondering if this approach looks like a good practice for apps with a lot of custom views, for nested PNG graphics and animations that may change based on user interaction. I created a BaseView class that extends UIView @interface BaseView : UIView { @protected BaseViewController *controller; } @property (retain...

UITableView display distorted before setAnimationTransition during view swap

Greetings! I'm trying to borrow the view flip concept from Apple's TheElements sample app. This sample employs a container UIView in which you can swap between two subviews. The flip is achieved using setAnimationTransition:forView:cache: and removing/adding each subview. In general, the flip works and I can swap between my two views (a...

Reduce Core-Graphics memory consumption on iphone

I am writing a program which redraws a graph every so often. Unfortunately it seems that for some reason core graphics does not seem to release the previous graphic so I run into memory problems fast. How can I force it to release memory at the end of each draw? Not that this is not a memory leak as the memory does get released when I l...

possible to release viewcontroller.view without releasing viewcontroller?

I have a viewcontroller which can't be released since it is a subclass with extra functionality... Anyway there are many of them, and I need the views to be released when they go offscreen. removeFromSuperView vanishes the views but they remain in memory. The only way I can get rid of the view from memory is to completely dealloc it. ...

UIView animation didEndSelector: method not getting called?

I have a UIView that is moved into view. After 2 seconds, I'd like to move the UIView out of view again. How do I do this? I have tried the below, but it doesn't work :( I have setup the NSLog, but it doesn't look like it's finishing and then calling the loadingViewDisappear: method :( Thank you. ... [UIView beginAnimations:@"Anim...

How does hiding a UIStatusBar apply to UIViews being shown?

I have a mostly-navigation-bar-driven application. A few cases require the presentation of a modal view, and one of those cases requires the hiding of the status bar. However, even if I hide the status bar before presenting the modal view, the view is offset by 20 pixels. Even if I set the frame of the modal view to 0,-20,320,480 afte...

How can i create a uiview that looks like the view in mail.app

I need to create a uiview that looks like the one to display mails in the mail.app on iphone. It looks, that the view is something like a UIWebView, but there is a header-view to display From, To and Subject. This header is non-zoomable and scrolls only by the y-axis. Is there a way to create such a header-view in the UIWebView... // ...

iPhone Development - 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? (don't quote apple docs) Thanks!! ...

iPhone Development - Setting up a view in a view controller

Hi, I'm learning to develop for iPhone without Interface Builder (a personal preference), and I'm not sure which function of a view controller I should be setting up the view in: init, viewDidLoad, or loadView. I read somewhere to only use init for the view controller, if anything, and not setting up the view as it could cause problems. ...

CALayer drawInContext vs addSublayer

How can I use both of these in the same UIView correctly? I have one custom subclassed CALayer in which I draw a pattern within drawInContext I have a another in which I set an overlay PNG image as the contents. I have a third which is just a background. How do I overlay all 3 of these items? [self.layer addSublayer:bottomLayer]; ...

iPhone Dev - UIToolbar goes in window or view?

Should I put the UIToolbar right in the window at the bottom, and then put the view above it (so the view doesn't continue underneath the toolbar), or should I just make the view cover the whole window and then add the toolbar as a subview to the view? So my question is, should the toolbar be a subview of the view or the window? - the w...

UIButton and setImage: not working consistently - inconsistent

I have a UIButton on a UIView. I want to programatically figure out which image to display inside the button when the view is displayed. I have overriden the drawRect method in the UIView and used a setImage to display the desired image. However, when the view displays, sometimes it draws the desired image, and sometimes it does not. I h...

Horizontal UIView transition using gestures

ok, here goes.... When you gesture right or left on the iPhone home screen to access your pages of applications, you get a seamless transition between the current page of apps and the next one you're moving to. I'd like to be able to create the feel of UIViews being almost 'stitched together' in the same way that different pages of app...

iPhone dev - Passing arguments in a selector

I have a barButtonItem that calls an action which swaps two views in an animation block. I disable the barButtonItem at the beginning of the action method that it calls, and the I want to enable it when its finished, so that the user can't flip the view again before it has finished flipping. It does this in a UIView animation block, so...

UIView dissapears after modalViewController is removed from superview

Hello, in my app i have a tabBarController and in it a navigationController. One of my view controllers is a TableViewController and under the navigationBar i added a uiView as a subview to the view like this: rectangleInfo = [[UIView alloc] initWithFrame:CGRectMake(0,0,[[UIScreen mainScreen] applicationFrame].size.width,26)]; rectangle...

Release for controllers and views

If I have a set of custom UIViewControllers that I release in a high level application "restart" routine, would a good way to release their views be to set self.view = nil; in the dealloc method? ...

UIProgressView not updating while my App loads its resources

Hi, I am trying to update a UIProgressView progress bar that I have in a UIView during a long resource loading process. Let's say I'm loading a bunch of bitmaps from a NIB file (like maybe a hundred). After I load 10, I issue a .progress to the UIProgressView that is part of a UIView that is already being displayed. So, I issue: myView....

How to make a UIView animation similar to when App launches from Springboard

I have a UIVew that I want to "pop" or "reveal" or whatever effect you see for Default.png when Springboard loads your App. Sorry if I'm not calling it the right name. Here is the code I'm trying to get to work: myView.alpha = 0.0f; [myViewController.view addSubview:myView]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimatio...

iPhone subview design (UIView vs UIViewController)

I'm designing a simple Quiz application. The application needs to display different types of QuizQuestions. Each type of QuizQuestion has a distinct behavior and UI. The user interface will be something like this: I would like to be able to design each type of QuizQuestion in Interface Builder. For example, a MultipleChoiceQuizQuesti...