Get to UIViewController from UIView on iPhone?
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 [self view] but I was wondering if there is a reverse reference? ...
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 [self view] but I was wondering if there is a reverse reference? ...
I'm trying to implement the shake "tutorial" on this page, but I think I'm missing something. I copied his accelerometer function into myAppViewController.m file and put some nslogs in there to see if it even gets into the function when I use the simulators "shake" function. Nothing shows up in the debug console. http://mithin.in/2009...
Hi guys, How to set this yellow button to be gray tinted one. I have tried adding image, but no luck Here is the screenshot: Here is my current code: (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:style]) { UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@...
Hi, I need to draw a UILabel striked through. Therefore I subclassed UILabel and implemented it as follows: @implementation UIStrikedLabel - (void)drawTextInRect:(CGRect)rect{ [super drawTextInRect:rect]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextFillRect(context,CGRectMake(0,rect.size.height/2,rect.si...
In Brad's CorePlot I've seen this snippet, which eliminated the need for some coffee. I'm totally awake now: NSDecimal result; NSScanner *theScanner = [[NSScanner alloc] initWithString:stringRepresentation]; [theScanner scanDecimal:&result]; And Apple says: A scanner’s locale affects the way it interprets values from the string....
for(UIView *subview in [scrollView subviews]) { NSLog(@"subviews Count=%d",[[scrollView subviews]count]); //[subview release]; [subview removeFromSuperview]; } in the above method if i use [subview removeFromSuperview]; it works fine...but if i use [subview release]; it crashes....i want to know that if both are same or is the...
I'm trying to get the iPhone Settings working in a small test app I'm writing using MonoTouch/MonoDevelop. It's probably super basic/fundamental in Xcode... ...however I didn't immediately see how to do it in the MonoTouch examples, and after a bit of reading guessed that a Settings.bundle folder in the root of my MonoDevelop solution t...
Is this possible? the effect I want is for the text to align so the left and right sides are straight. Similar to the style of a newspaper. Thanks! ...
I'm trying to add 50 beta testers to my app through ad hoc. In the portal, it gives you an option to upload a file for UDIDS. What format should it be? Also, it mentioned that you are only limited to 100 devices per year and they cannot be changed. Does this mean once I added my beta testers, they cannot be changed forever, even for othe...
I can launch Google Maps, Mail, Safari and others... but is there the same functionality for Calendar?? EDIT: I only want to add an event into the calendar. Thanks guys! Nick. ...
Hi, I have a small image from a database and the image's average color need to be altered slightly. It's a CGImageRef and I thought of creating a CGContext, drawing the image to this context, then subsequently changing the bitmap data somehow and finally rendering it. But how can I alter the color information? Thanks for your help! ...
Hi All, I want to have a on top of uiwebview, which will scroll out of view as I scroll webview downward. The problem is I am not able to raise/handle the button touchupinside event from the viewcontroller. My guess is webview is eating the event. How can I make the button raise events? One solution is to have a subview containing the bu...
My App has a UITabBarController with five tabs. I needed to rotate orientations only for the fifth tab. I was able to get all five to rotate to landscape by subclassing the UITabBarController @implementation TabBarControllerRotate (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { //return ...
UPDATED Scroll down to see the question re-asked more clearly.... If I had the name of a particular UIImageView (IBOutlet) stored in a variable, how can I use it to change the image that is displayed. I tried this, but it does not work. I'm still new to iphone programming, so any help would be appreciated. NSString *TmpImage = @"0.p...
Hi, I have a small iPhone app which I've created a button with some functionality in. My question is, how can I call this button without actually pressing it? Any help would be appreciated! Thanks ...
Hi: I need to make a for loop and between every loop wait 2 seconds and continue for (int i = 0; i < [stories count]; i++) { //my code //sleep 2 seconds and continue } How can I do this? ...
I am developing a simple web page to be viewed after an iphone application completes. I am finding the safari degrades the image quality of the jpg so its all fuzzy. The image is background image applied to a div div.foo { background: url(../images/foo.jpg) no-repeat; width:320px; height:349px; } The width and height ar...
I'm wondering why there is a -arrayForKey: method, but no -setArrayForKey: method. How could I set that array? ...
I.e., my app sets some standard default values at the beginning. Then those values may get overridden by the user. And when the user messes things up, I want to set those settings back to my app default values. As I understand it, the app defaults are a different dictionary than the user defaults, and the user defaults just override thos...
Just got a notice that the provisioning profile for one of my apps is about to expire. Is there some way I can renew the existing one or must I recreate a new one? ...