Search Results

Search found 489 results on 20 pages for 'uiapplication'.

Page 11/20 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Animated status bar style transition, a la iPod app

    - by Ben Williamson
    In the iPod app, the navigation views have the default status bar style, and the Now Playing view is in the black style. The transition between them is animated with a crossfade. I want to do that. My first attempt: [UIView beginAnimations:@"whatever" context:nil]; [UIView setAnimationDuration:0.5]; self.navigationController.navigationBar.barStyle = UIBarStyleBlack; [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlack [UIView commitAnimations]; No joy, it pops to black. Takers?

    Read the article

  • Can I update an iOS Enterprise App in the background like an App Store app can?

    - by lehn0058
    I have an iOS enterprise app that we are wirelessly distributing to our devices. Currently the app polls our server once a day to see if there is an app update. If there is, we try to install it by having the app call the following code: NSURL *installUrl = [NSURL URLWithString:[NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", plistUrl]]; [[UIApplication sharedApplication] openURL:installUrl]; This causes the app to prompt the user with an alert dialog to install the update. If they click install, the app closes and the update is downloaded and installed. I am wondering if there is anything for enterprise apps for iOS 7 similar to the AppStore's automatic updates? I would like to be able to update our app without the user having to press an update button and be able to update at a time when the user won't have to wait for it to install.

    Read the article

  • What is the correct way to add a subview to a new window, making it aware of its available window si

    - by favo
    Hi, This is some kind of a basic question: I am adding a new Subview to a window using: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { viewController = [[myViewController alloc] initWithNibName:@"myNib" bundle:nil]; [window addSubview:viewController.view]; This displays the view at 100% on the window, having the Clock overlaying some pixels of that view on top. Rotating makes the view aware of the clock and resizes it to begin correctly below the clock without any overlay. What is the correct way to add a subview to a new window, making it aware of its available window size?

    Read the article

  • iPhone - UITableViewController not loading table

    - by RyanJM
    I'm pushing a UITableViewController onto a navigationController. The title (set in the viewDidLoad) shows up but not the table. numberOfSectionsInTableView is called. But tableView:numberOfRowsInSection: is not called. I'm passing in 1 so it should be looking for number of rows. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } I'm setting up the view in the following manner: SelectUserViewController *nextController = [[SelectUserViewController alloc] initWithStyle:UITableViewStyleGrouped]; nextController.managedObjectContext = managedObjectContext; OrangeQCAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.navigationController pushViewController:nextController animated:YES]; Again, the viewDidLoad method is called. And my class is set up as follows: @interface SelectUserViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {...} What else should I be looking at? When I go through the debugger, after it looks at numberOfSectionsInTableView it just disappears (I think it is in the UITableViewController class) and never comes back.

    Read the article

  • iPhone:How to find the control interaction under Touch?

    - by user187532
    Hello friends, I have a UILabel control in a view. I want to detect touch event occurred when this label touched. I added the following code, which should work whenever touch happens on the view. - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { // This should be called only when the label is touched, not all the time.. [ [UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.mywebsite.com"] ]; } Whenever that particular label is touched my code should do the process further, not when the touch is happening anywhere in the view. How do i find out the particular label (or) any control is touched under touchesEnded function ? Could someone guide me on this? Thank you.

    Read the article

  • iPhone: Using a Singleton with Tabview Controller and Navigation Controller

    - by malleswar
    Hi Friends, I have developed a small iPhone application by using singleton that I use to navigate through the views. Here is a sample method from my singleton class. + (void) loadMenuController:(NSMutableArray *)menuItems{ MenuViewController *menuViewControler = [[MenuViewController alloc] initWithNibName:@"MenuViewController" bundle:nil]; [menuViewControler setMenuItems:menuItems]; RootViewController *root = ( P2MAppDelegate *appDelegate = (P2MAppDelegate*) [[UIApplication sharedApplication] delegate]; UINavigationController *navController = [appDelegate navigationController]; [navController pushViewController:menuViewControler animated:YES]; [menuViewControler release]; } Now my requirement has changed to require a tab view controller . I could change my application delegate to a tabview controller but I still need to navigate inside each tab. I am unable get a clue how to navigate from my singleton class. Please guide me. Please let me know if my query is not clear. Thanks in advance. Regards, Malleswar

    Read the article

  • How to Invoke iPhone Maps for Directions with Current Location as Start Address

    - by eriaac
    Hi all. I know it's possible to start the iPhone maps application by calling openURL on a google maps URL with parameters saddr and daddr with location strings or LatLong (see ex. below), but I'm wondering if it's possible to make the start address be the "Current Location" maps bookmark so that I can use the maps app's location handling code. My Google search has been pretty fruitless. ex: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @"http://maps.google.com/maps?saddr=%@&daddr=%@", myLatLong, latlong]]]; Except with something to invoke the current location bookmark in place of myLatLong. Thanks!

    Read the article

  • Why am I getting this warning about my app delegate and CLLocationManageDelegate?

    - by Dan Ray
    Observe this perfectly simple UIViewController subclass method: -(IBAction)launchSearch { OffersSearchController *search = [[OffersSearchController alloc] initWithNibName:@"OffersSearchView" bundle:nil]; EverWondrAppDelegate *del = [UIApplication sharedApplication].delegate; [del.navigationController pushViewController:search animated:YES]; [search release]; } On the line where I get *del, I am getting a compiler warning that reads, Type 'id <UIApplicationDelegate>' does not conform to the 'CLLocationManagerDelegate' protocol. In fact, my app delegate DOES conform to that protocol, AND what I'm doing here has nothing at all to do with that. So what's up with that message? Secondary question: sometimes I can get to my navigationController via self.navigationController, and sometimes I can't, and have to go to my app delegate's property to get it like I'm doing here. Any hint about why that is would be very useful.

    Read the article

  • Where do I change the height of a navigationBar for an iPhone app?

    - by Tony
    In my applicationDidFinishLaunching I set up a UINavigationController: - (void)applicationDidFinishLaunching:(UIApplication *)application { navController = [[UINavigationController alloc] init]; [[navController navigationBar] setFrame:CGRectMake(0.0,0.0,320.0,20.0)]; ... } As you can see, I am trying to make the navigation controller's height 20px. However, this is not working. I would imagine setFrame must be the correct function but I am not calling it in the right place. I realize that other questions on SO are similar to mine, but I think setting the navigationBar height should be possible if it responds to setFrame...right? Also, anyone know the default height of the navigationBar? Thanks!

    Read the article

  • Setting Back Button Tittle in Navigation Controller problem

    - by Rafael
    Hi, I'm trying to change Back Button tittle in a navigation controller in the following way: In the parent controller I put this in vieDidLoad: self.title = @"Calendars"; self.navigationItem.backBarButtonItem.title = @"Previous"; But this controller is in the stack since I initialized the app: -(void)applicationDidFinishLaunching:(UIApplication *)application{ navController.viewControllers= [NSArray arrayWithObjects:aController,aBcontroller,nil]; [window addSubview:navController.view]; } So, the viewDidLoad in aController is not called until I select the back buttom the first time in the bController... Does anyone knows how to call viewDidLoad just when I push it into the stack? Or do you know another way to change the BackButtom title? Thanks in advanced for your help.

    Read the article

  • iPhone noob - different method types?

    - by codemonkey
    My apologies in advance for what is probably a really dumb question. I'm familiar (or at least getting familiar) with instance and class methods in objective-c, but have also seen method implementations that look like this: #import "Utilities.h" #import "CHAPPAppDelegate.h" #import "AppState.h" @implementation Utilities CHAPPAppDelegate* GetAppDelegate() { return (CHAPPAppDelegate *)[UIApplication sharedApplication].delegate; } AppState* GetAppState() { return [GetAppDelegate() appState]; } @end What are these? While I'm sure this is documented somewhere, I don't know what term to use in searching for an explanation of what's being done here. I like the syntax methods like this let me use when calling them, but I'm not sure exactly what I'm doing, what the implications are, how to send parameters to these types of functions, etc? To clarify how I ended up in this position, I started using these methods in a "utilities" class of mine after reading some online blog describing the author's preference for declaring these functions this way. Now I can't seem to track down a more detailed explanation of what exactly the differences are, etc.

    Read the article

  • Connecting ipad to external monitor

    - by Josh P.
    I am trying to connect my ipad app to an external screen using the following (not checking the correct resolution for no - just want it up and running). - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [window addSubview:[navigationController view]]; if ([[UIScreen screens] count] > 1) { window.screen = [[UIScreen screens] objectAtIndex:1]; } [window makeKeyAndVisible]; return YES; } Is this supposed to redirect everything to the external monitor? How dows it work with touches/gestures? I see in the Apple apps, the controls etc are left on the ipad screen...

    Read the article

  • Mvc Cocoa: How to get controller object for UIBarButtonItem target in view?

    - by plehoux
    I got a basic application where I want the action method of UIBarButtonItem to be in the parent controller. My view has been created programmatically, so I can't use IBAction. RootViewController - NavigationViewController - NavigationView - UIBarButtonItem Here's how have done it for the moment, it works for now... but it's not a really scalable technic (in NavigationView.m): BookAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; UIBarButtonItem *soundEffects = [[UIBarButtonItem alloc] initWithTitle:@"Sound Effects" style:UIBarButtonItemStyleBordered target:[delegate.rootViewController navigationViewController] action:@selector(soundEffectsClicked:)]; What would be a better technic to get the NavigationViewController object?

    Read the article

  • How to call another class's method from my app delegate

    - by Jared
    I have an application that utilizes UILocalNotifications to pop-up UIAlertViews. When the notification fires, the user chooses to go into the app, and this method is called from my app delegate: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {...} Where I can handle it and where I also prompt another alertview for more information. So when the app launches, it is displaying view A, and then the alertview pops up and prompts for input. This alertview, however, is originating from my app delegate. I need to be able to reload view A when the user hits Yes/No on the alertview. How can I do that from within my app delegate? Any help is appreciated!!

    Read the article

  • iPhone - making the crash information more specific

    - by Digital Robot
    I have an app that is crashing at some point. Even with NSZombieEnabled turned on, the only thing I see is this message on the console: : * -[CFRunLoopTimer release]: message sent to deallocated instance 0x4cb34e0 but as the app is crashed, there's no way to know what object is this and the thread overview is not helping that much. #0 0x34a80466 in objc_msgSend #1 0x357e53c8 in CFRelease #2 0x357f3976 in __CFTypeCollectionRelease #3 0x3580c0b6 in __CFSetReleaseValue #4 0x357e6a5c in __CFBasicHashDrain #5 0x357e6900 in __CFSetDeallocate #6 0x357e54b6 in _CFRelease #7 0x357e53dc in CFRelease #8 0x3580c098 in -[__NSCFSet release] #9 0x3570f3be in -[_NSFaultingMutableSet dealloc] #10 0x3570f260 in -[_NSFaultingMutableSet release] #11 0x35702480 in -[NSManagedObject(_NSInternalMethods) _clearRawPropertiesWithHint:] #12 0x357022a8 in -[NSFaultHandler turnObject:intoFaultWithContext:] #13 0x35703dc0 in -[NSManagedObject dealloc] #14 0x356eab34 in -[_PFManagedObjectReferenceQueue _processReferenceQueue:] #15 0x357127d6 in _performRunLoopAction #16 0x3580ac58 in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ #17 0x3580aacc in __CFRunLoopDoObservers #18 0x358020ca in __CFRunLoopRun #19 0x35801c86 in CFRunLoopRunSpecific #20 0x35801b8e in CFRunLoopRunInMode #21 0x320c84aa in GSEventRunModal #22 0x320c8556 in GSEventRun #23 0x341dc328 in -[UIApplication _run] #24 0x341d9e92 in UIApplicationMain #25 0x00002e02 in main at main.m:14 it appears to be something related to core data, but knowing that doesn't help that much, because the app is all core data based and it crashes when I am not doing anything related to core data. is there a way to make the debugger more specific? thanks

    Read the article

  • Getting exc_bad_access error only when mallocguard is enabled

    - by Nareshkumar
    I have an app for iPhone in development which works properly when the Malloc guard is not enabled. However when i try to enable the malloc guard i get the following error after the app is loaded. #0 0x95f65684 in objc_msgSend () #1 0x30506515 in NSPopAutoreleasePool () #2 0x30901697 in _UIApplicationHandleEvent () #3 0x32046375 in PurpleEventCallback () #4 0x30245560 in CFRunLoopRunSpecific () #5 0x30244628 in CFRunLoopRunInMode () #6 0x308f930d in -[UIApplication _run] () #7 0x309021ee in UIApplicationMain () Now my problem is that i am not able to debug the exact location where its getting the error.. have tried malloc_error_break but didnt work out. Is it that malloc guard enabling auto releases some of the objects based on allocation??

    Read the article

  • NSOperationqueue i want to block main thread

    - by alexeyndru
    i want to block the main thread until something else is done in the background. i used: result=[self performSelectorInBackground:@selector(calculate:) withObject:expression]; just bellow this line I am using result: [self use:result]; i dont want to use result until it is available. to achieve this I implemented calculate: { [[(AppDelegate *)[[UIApplication sharedApplication] delegate] queue] waitUntilAllOperationsAreFinished]; calculating result... } and still, the result is used before it is calculated. so, i didnt block the main thread. pls help me do that. thanks

    Read the article

  • Is there anyone out there that codes like me?

    - by Jacob Relkin
    Hi, Some people have told me that my coding style is a lot different than theirs. I think I am somewhat neurotic when it comes to spacing and indenting though. Here's a snippet to show you what I mean: - ( void ) applicationDidFinishLaunching: ( UIApplication *) application { SomeObject *object = [ [ SomeObject alloc ] init ]; int x = 100 / 5; object.someInstanceVariable = ( ( 4 * x ) + rand() ); [ object someMethod ]; } Notice how I space out all of my brackets/parentheses, start curly braces on the same line, "my code has room to breathe", so to speak. So my questions are a) is this normal and b) What's your coding style?

    Read the article

  • iphone app hangs in AppDelegate (?)

    - by d_CFO
    No nib/IB, so I've inserted "myAppDelegate" in main and deleted the reference to main.xib in info.plist. Debug continues nicely through all five tab controllers; they seem to have gotten properly loaded into the nav controller. In fact, control passes out of the last "}" in applicationDidFinishLaunching. But there was no (visible) response back at [window addSubview:[tabBarController view]]; and [window makeKeyAndVisible]; statements, much less to the loadView within the first tab (program execution never gets there). The last line is, UIApplication _performInitializationWithURL:sourceBundleID:]. I missed a step? I executed a step improperly?

    Read the article

  • Need to open the SMS/MMS app and have an image pre-loaded into the text input in iPhone OS

    - by jmurphy
    Hello, I am trying to open the SMS/MMS app on the iPhone and have an image that is saved in the camera roll pre loaded into the text field. Is this possible? Here is the code I have tried: NSString *urlString = [NSString stringWithString:@"sms://asset/asset.JPG?id=1000000041&ext=JPG"]; NSString *escaped = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSLog(@"URL: %@", escaped); [[UIApplication sharedApplication] openURL:[NSURL URLWithString:escaped]]; I received the URL from a return after I saved the image to the camera roll. Unfortunately this doesn't work. Any ideas? Thanks!

    Read the article

  • press button to open web page from app

    - by Lee
    I have an app that I want to interact with a web page. Basically I want to press a button and the web page will open in a new view... Sorry I wasn't clear, I am developing on a Mac for an iPhone. Currently I have a "locate me" app that displays your Latitude and Longitude. I want to use those variables to populate 2 of the blanks on a PHP web page/form I have developed. I have added a label and button to my current app, when the button is pressed the URL with the Lat and Long (as passed vars) are displayed in the label. I want those vars to appear on my web page. Hope this is clearer... Solved: I just added these lines of code I found here: NSURL *url = [ [ NSURL alloc ] initWithString: @"http://www.cnn.com" ]; [[UIApplication sharedApplication] openURL:url];

    Read the article

  • MPMediaickerController memory leak identified by Leaks instrument

    - by Joe
    This is code from Apple's Addmusic example. MPMediaPickerController *picker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeMusic]; picker.delegate = self; picker.allowsPickingMultipleItems = YES; picker.prompt = NSLocalizedString (@"Add songs to play", "Prompt in media item picker"); // The media item picker uses the default UI style, so it needs a default-style // status bar to match it visually [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault animated: YES]; [self presentModalViewController: picker animated: YES]; [picker release]; I'm using this code in my app and the Leaks instrument highlights a leak on the line: [self presentModalViewController: picker animated: YES]; I think that this is because this line retains a reference to picker which cannot be subsequently released. Is there any way around this or is Leaks incorrectly identifying a leak?

    Read the article

  • Delegates doesnot work properly

    - by Warrior
    I am new to iphone development.I am covering the date to the desired format and set it to the delegates and get its value in the another view.The session restarts when i tried to get the value from delegates.If i set the original date and not the formatted date in the set delegate ,then i able to get the value in the another view.If i also give any static string value,then also i am able to the static string value back.Only the formatted date which is string is set then the session restarts.If i print and check the value of the formatted date it prints the correct formatted date only.Please help me out.Here is my code for date conversion NSString *dateval=[[stories objectAtIndex: storyIndex] objectForKey:@"date"]; NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init]; [inputFormatter setDateFormat:@"EEE, MMM dd, yyyy"]; NSDate *inputDate = [inputFormatter dateFromString:dateval]; NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; [outputFormatter setDateFormat:@"MMMM dd"]; NSString *outputDate = [outputFormatter stringFromDate:inputDate]; AppDelegate *delegate=(AppDelegate *)[[UIApplication sharedApplication]delegate]; [delegate setCurrentDates:outputDate]; Thanks.

    Read the article

  • Question about varrying top margin when using custom Fonts on the iPhone.

    - by user170030
    I am using FontLabel to display varying lengths of texts in a custom font. I size the FontLabel using the following : CGSize size = [myString sizeWithFont:[UIFont systemFontOfSize:[[[UIApplication sharedApplication] delegate] getFontSize]] constrainedToSize:CGSizeMake(290, 4000) lineBreakMode:UILineBreakModeWordWrap]; For some reason, this always presents a Fontlabel where the text starts at a different space from the top. Sometimes the text begins at the correct location. Other times, it appears either too high or too low. Would appreciate some help in how to solve this issue.

    Read the article

  • iPhone: Run method from another view

    - by Nic Hubbard
    I have two views that I am loading, the first is a view with an MKMapView, the second has a table view. I would like to access a method in the first views controller, from the second view. I have been told to use the delegate for this, but I can't get it right. In my app delegate, I have set up added properties for the class of my first view. Then, in my second view, I try to access the first view using the delegate: MyAppDelegate *mainDelegate = (MyAppDelegate*) [[UIApplication sharedApplication] delegate]; Then try: [mainDelegate.mapViewControllerClass myMethodToRun]; It seems to me that it should be calling the myMethodToRun method, which is in my map view. But, it does not work. What is wrong with what I am doing here? There must be a way to access a method of another view...

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >