I have a rectangle image (jpg) and want to use it to fill the background of a button with rounded corner in xcode. I wrote the following: UIButton *button...
I have an image view, declared programmatically, and I am setting its image, also programmatically. However, I find myself unable to set the image to both fit the aspect...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You...
Is there a built-in way to get from a UIView to its UIViewController? I know you can get from UIViewController to its UIView via...
Let’s say we have a view controller with one sub view. the subview takes up the center of the screen with 100 px margins on all sides. We then...
Why doesn’t @try block work? It crashed the app, but it was supposed to be caught by the @try block. NSString* test = [NSString stringWithString:@"ss"]; @try {...
I have a URL string (NSString) with spaces and & characters. How do I url encode the entire string (including the & ampersand character and spaces)? 24 Answers 24
In Cocoa, if I want to loop through an NSMutableArray and remove multiple objects that fit a certain criteria, what’s the best way to do this without restarting the...
I want to check if the app is running in the background. In: locationManagerDidUpdateLocation { if(app is runing in background){ do this } } 8 Answers 8
I saw the “new type” BOOL (YES, NO). I read that this type is almost like a char. For testing I did : NSLog(@"Size of BOOL %d", sizeof(BOOL)); NSLog(@"Size...