I've created a UIView subclass and corresponding xib file where I've laid out some UILabels and UIImageViews. I want to then put multiple copies of this custom UIView into a UIViewController.
When I do that they appear blank in interface builder and don't appear when the app loads. What methods do I need to implement on the UIView subc...
I have a custom-drawn UIView (i.e. uses drawView to render itself). The data to be displayed will usually be larger than the screen can show, so I want to include scroll view functionality in the view so clients of the class don't have to deal with it, and so the custom view can handle lazy loading of data as it's scrolled.
But how do ...
Is there any way to make a UIView resign its first responder status when the user taps outside of the view bounds?
...
This is a weird question inasmuch as I've definitely had projects that work fine, possibly because I've been doing something differently. But now I'm confounded.
I create a new View-based iPad app with Xcode (3.2.3 fwiw). This gets me a default view controller with a default view which gets unarchived and displayed at startup.
When I ...
This code is being executed in the touchesended method of a subclassed uiview, however it doesn't animate, it just instantly changes the background color. What is wrong?
self.backgroundColor = [UIColor blackColor];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:20];
[UIView setAnimationCurve:UIV...
Hi
I've been trying to animate a uiwebview by making it's frame shorter height using the UIView animateWithDuration:animations: method. I succesfully shorten the uiwebview by making the frame property equal to a shorter height however when i scroll to the bottom of the uiwebview I find a grey box.
After I animate the uiwebview to be sh...
I am going to end up with an array of RSS feeds, and would like a label or some such to display them at the bottom of the view. I would like to animate through each feed in the array.
This is what i have so far to animate, which, works for the fade, but only animates the last item of the array.
feed = [[UILabel alloc] initWithFrame:CGR...
I am trying to build an fairly simple iPad app that requires me to navigate through multiple views. What I want to do is have some sort of main menu view with multiple buttons on it, and when you click one of the buttons the new view appears and then you work with that. I'm new to iPad development, so I have a few questions about the b...
Hi all, I have an iPhone app which hides the status bar when run. After launching a MFMessageComposeViewController and dismissing it (after either send or cancel) all my previously drawn elements are shifted down 20px. This is clearly to do with the status bar showing when the MFMessageComposeViewController is presented.
Can I either st...
I want to place a number pad for entering digits above a tab bar (like the builtin dialer in MobilePhone.app).
The default behavior is to overlay the tab bar, which not only looks ugly, but also makes it impossible to leave the page. Is it possible (and allowed) to move the keyboard somehow? Or do I need to roll my own keypad control?
...
Hello,
I have one UIViewController which manage a portrait view and some application logic. However, I need to setup a different view for the landscape orientation. The widgets between the 2 views are mainly the same but their layout is very different.
My first try was to use one UIViewController and one associated XIB. In the XIB, I ...
Hi guys,
I set the clipsToBounds property of my UIView to NO, then I created a UIButton half in the bounds, and half out of the bounds. I found that only the part in the bounds is clickable.
How can I make the whole button clickable?
Any help would be appreciated. Thanks in advance.
...
Hi, I have a UIViewController that is being pushed via a UINavigationViewController.
The viewController's view has a UIScrollView as a subview.
I'm initializing the UIScrollView with the same bounds as the viewController's view bounds and set the auto resize mask to flexible height/width so it will still occupy all the screen.
This work...
I try to scale an UIView. And there is a white background outside of an UIview. How I can take it out to see just background view? Thanks!
self.view.transform = CGAffineTransformMakeScale(.5,.5);
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.9];
self.view.transform = CGAffineTransformMakeScale(1,1);
[UIView c...
I've looked all over the net trying to figure out how to get the bounds based on orientation. The notifications are working fine but I'm getting the bounds of the view via:
CGRect cgRect = self.view.bounds;
which returns {0, 0}, {320, 460} which is correct but when the device is rotated it returns the same CGRect, where I was expectin...
The documentation is clear on the fact that animations (invoked with [UIView commitAnimations]) execute on a separate thread. What's not clear (to me, anyway) is whether the animationDidStopSelector is executed on the main (UI) thread or the same thread as the animation.
Given the following code:
- (void) doSomethingCool {
// Fade ...
Is there a faster method than looping through a uiview's subviews and testing cgrectcontainspoint?
...
I have encountered a strange behaviour when presenting my modal view. I have a scroll view on as my main view with 4 pages... tapping on a button on the scroll view presents the modal view, but i can dismiss the modal view by swiping left or right. Obviously i just want to be able to dismiss using the Done button.
This is the method i u...
Hi, I want to show a popover with a custom contentsize.
I can do it doing like so
UINavigationController* popoverContent = [[UINavigationController alloc] init];
UIView* popoverView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 800, 800)];
popoverView.backgroundColor = [UIColor blueColor];
popoverContent.view = popov...
Hi all,
I've created a bunch of sublayers within my view, populating each one with a graphic, so effectively they are sprites. However, when I call [lineLayer setValue:[NSNumber numberWithFloat:0.5] forKeyPath:@"transform.scale"] it appears to 'tween' to that size instead of just appearing at the new scale.
Is there any way of switchin...