uikit

Statusbar overlaps ViewController

Hi, I in my AppDelegate, I use: ActivitiesViewController *acController = [[ActivitiesViewController alloc] initWithNibName:@"ActivitiesView" bundle:[NSBundle mainBundle]]; UINavigationController *acNavController = [[UINavigationController alloc] initWithRootViewController:acController]; [self.tabBarController setSelectedIndex:0...

How to fix iPhone Simulator trying to launch a Nib that isn't there?

I'm getting this error message when I Build&Go: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "TestappViewController"' I created a blank new project and then started to create a RootViewController which ho...

How can I prevent that iPhone OS switches off the screen or goes into standby?

How could I make sure that iPhone doesn't disable the screen or go to sleep for about 20 to 30 minutes? ...

do I have to release IBOutlets in -(void)viewDidUnload?

They say: // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; I've never seen that previously. so I wonder if they talk about nib outlets here? ...

Why can't I put a constant into an CGRectMake?

I have tried this: CGRectMake(0.0f, kFooBarHeight, 100.0f, 10.0f); I get an error "unexpected ';' before ')'", and "too few arguments for CGRectMake". When I exchange this with: CGFloat foo = kFooBarHeight; CGRectMake(0.0f, foo, 100.0f, 10.0f); then all is fine. Are constants not suitable to pass along as parameters? ...

How can I provide a value in minutes to setAnimationDuration?

I think a value of 1.0 represents one second, but I'm not very sure with that. Is that a hexadecimal system? What would you provide to give exactly one minute for duration? ...

How can I enforce an specific direction (i.e. clockwise) of rotation in Core Animation?

I am rotating a view with this: CGAffineTransform rotatedTransform = CGAffineTransformRotate(CGAffineTransformIdentity, rotationValue); I have an object which I want to spin around for about 320 degrees. Now Core Animation is clever and just rotates it as much as needed, doing that by rotating it with -40 degrees. So the object rotate...

Why doesn't the touch event arrive at my UIImageView?

I have some nested views like this: First, there is an big UIView. Inside this, there is another UIView. And inside this, there is an MyNiceButtons class that inherits from UIView. So I have: UIView > UIView > MyNiceButtons (= an UIView). In detail, the UIView creates an UIImageView and adds it as a child view to itself, which repres...

Determine whick part of the UITableView cell was tapped

Is there a way to determine where in the cell was tapped? I am currently using tableView:didSelectRowAtIndexPath but this only tells me that the cell was selected. ...

How can I pause a currently running animation?

I have a Core Animation running and want to pause it when a button is pressed. So there is a method -pauseAnimation. When the animation is paused, I want the animated view to stay in the state as it currently was while animating. i.e. if a view moves from top left to bottom right, and somewhere in the middle the animation is paused, the ...

Is there an overview of all codes that can be used inside NSLog()?

i.e. %@ for strings, %f for doubles... I don't know the word for these placeholders but it would be great to have list for how to print booleans and other values. ...

How do I access an BOOL type property?

I have an class, and in the header I define this: @interface MyViewController : UIViewController { BOOL blackBackground; } @property(nonatomic, assign) BOOL blackBackground; In the implementation I have the @synthesize for blackBackground. Then, I instantiate this object and do: [myViewController setBlackBackground:YES]; now t...

How can an underlying view know if it's rectangle got touched, no matter if directly or indirectly?

This is for learning: I have an UIView which is transparent and covers almost the whole screen. I left 50 pixels at the top. It is a child of the View Controller's view. Underneeth the UIView there's MyView that inherits from UIView, which matches the screen size. And inside this MyView class, I ask for a touch on it very simple with...

Can I work with M3G on iPhone OS?

I've been reading that M3G is something based on OpenGL ES...so can I work with this on iPhone OS? Did anyone do that already? ...

Is it possible / performant to switch between an OpenGL ES view and UIView in one application?

Imagine an iPhone app, which starts with an standard UIView showing some buttons and stuff. Then there is a stats button, you tap it, and the UIView slides away. Instead an OpenGL ES view comes in, and shows a nice statistics curve. I know you can mix OpenGL ES with UIView somehow but people say it's a bad idea. Does this also apply if...

Why can't I do any CABasicAnimation or Keyframe animation stuff?

For some reason Xcode tells me that it doesn't find symbols as soon as I use something like kCAFillModeForwards. There must be a library or class that I have to include...but which one? The normal Core Animation stuff works fine like [myView beginAnimations...]. What's the trick to get the more sophisticated animation stuff to work? I'v...

How can I do an complex chained animation the right way?

Example: 1) fade an uiview from alpha 0.0 to 0.2 2) fade back to 0.15 3) fade to 0.25 4) fade to 0.2 5) fade to 0.35 6) fade to 0.3 7) fade to 0.45 8) fade to 0.4 ... and so on. each with a duration of 0.05 sec. The effect is a flashy appearing view. Just for fun. Previously I did this with simple UIView animation blocks, where every n...

What does the value 1e100f stand for?

I've seen this in a snippet: animation.repeatCount = 1e100f; my math classes are long time ago. So 1e100f would be a number with 100 zeros? So in this case the programer wanted to have infinite repeatCount? ...

How do I save state with CALayers?

I have a simple iphone application that paints blocks using a subclass of CALayer and am trying to find the best way to save state or persist the currently created layers. I tried using Brad Larson's answer from this previous question on storing custom objects in the NSUserDefaults, which worked for persisting my subclass of CALayer, bu...

Why should I use an CATransaction in an animation?

I've found this code snippet: [self setValue:direction forKey:@"currentDirection"]; CAKeyframeAnimation * animation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; animation.path = path; animation.duration = grids * gridWidth / [self speed]; animation.fillMode = kCAFillModeForwards; animation.removedOnCompletion = NO; animati...