uiapplicationdelegate

Hiding iPhone Status Bar pulls my tableViews up by 20px

When doing an asynchronous HTTP request, I hide the iPhone status bar and animate in my own custom UIViewController to show upload status. So instead of seeing signal strength, carrier, time and battery life, the user gets messages based on the progress of the HTTP request. My status bar is exactly 20px high, and fits nicely where the ...

How to access properties/methods in other classes

I have a RootViewController that has some UITabBarController properties: @interface RootViewController : UIViewController<LoginViewDelegate, UITabBarControllerDelegate> { UIBarButtonItem* loginButton; NSUserDefaults* prefs; UITabBarController* arTabBarController; UITabBarController* stvTabBarController; UITabB...

[iPhone] Understanding UIApplicationDelegate

When design iPhone applications, I have several questions: Q1 : what considerations if suddenly calling when app is running ? similar with SMS, low power notification etc. (what else ? ) Q2 : what should do for low memory ? Q3 : how to save data when quitting ? ...... All those questions are related with UIApplicationDelegate. The...

ApplicationWillTerminate in iOS 4.0

Hi, The applicationWillTerminate delegate method is not getting called in iOS 4.0 When I hit the Home button I am seeing the applicationWillResignActive and applicationDidEnterBackground delegate methods getting called. - (void)applicationWillResignActive:(UIApplication *)application { NSLog(@"Application Did Resign Active"); } - ...

iPhone Application Delegate variable is not being retained

I am having a very odd issue retrieving/retaining a variable in my iPhone application delegate (AppDelegate). Initially, I can step through and see that my values are passed to logfile (the NSString variable in question), but when logfile is retrieved from another class (see the code below), it faults. Here is my AppDelegate.h file: ...

UIView (subview) does not send IBActions to AppDelegate.

I'm having this problem because I originially made everything in the main NIB, but then after reading learned that it is better to use subviews. I've got my IBActions in the AppDelegate, and I've successfully connected and loaded my subviews. However, when I try to connect my buttons in the subviews to the IBActions in the AppDelegate,...

Putting iPhone into Sleep Mode Programatically

Hi all, I had used the following code to prevent the iPhone from entering the sleep mode. [UIApplication sharedApplication].idleTimerDisabled=YES But is it possible to put the iphone in Sleep mode programatically ? Thanks ...

Consequence of importing appDelegate in a class and the same class in appDelegate

Hi all, I want to know the consequence of importing appDelegate in a class and the same class in appDelegate. Because, I'm doing this in my application successfully, but it's recommended that it should not be done. I couldn't find the answer despite a lot of searching. Thanks in advance. ...

In iOS4 applicationWillEnterForeground may get called before applicationDidEnterBackground and it makes problem

Hi, In iOS 4, if I close & re-open my app rapidly then (after applicationWillResignActive invocation) there is a chance for applicationWillEnterForeground to be get called well before the applicationDidEnterBackground and results in a black blank screen as because the app entered into background state immediately after the foreg...

[UIApplication sharedApplication] keyWindow] is nil ?

Hi, I want to convert a CGPoint from my UIView to UIWindow coordinates and have realized that UIApplication keyWindow is always nil, how come is this? I have tried convertPoint:toView: method form UIView. Please see this sample code I tried in the view controller in a template of Xcode (View application): - (void)viewDidLoad { [...

Can Objects Call the Main Application?

Please bear with me, this is probably a very simple problem for an expert but I'm new to the language. I'm trying to create an application that dynamically generates and releases a series of views, which are displayed in the main window. The problem I am having is in swapping between them. I want each view to contain buttons that cause ...

How do I use UIApplicationDelegate throughout the program?

I want to know when the status bar changes height as a result e.g. of a phone call in progress. So I put the following in my UIApplicationDelegate: -(void)application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame { NSLog(@"yup, got here"); } and indeed when I toggle the in-call status bar on the ...

Using applicationwillenterforeground for a passcode screen

Before iOS4, my app's initial view controller would check a passcode on/off settings variable in viewWillAppear and if set on, present a modal passcode screen that would stay there until the correct passcode was entered or the Home button was pressed. With iOS4, if my app has been in the background, I would like the user to feel comfort...

Replacing UITabBarController in UIApplicationDelegate

Heya I'm having a problem with navigation logic in my iPhone app and was wondering if you could help? When the app first starts it loads a UITabBarController with 2 options : Load, and Create. Whichever of the two options is chosen loads a view into that tab with the appropriate information. From here however, when the users either sel...

iPhone DropBox App Like implementation - flipping tab bar to reveal login screen

I am writing an application where you need to show login screen modally and the app has a tab bar. I have added tab bar directly to the UIWindow. To flip it to a new view (login view) I have overridden applicationDidFinishLaunching where I check if user has login credentials, then I do not show the login screen otherwise (assuming first...

[Iphone] Is it possible to subclass UiApplicationDelegate protocol?

To be honest I don't know how to call it, so I'll try to describe it. UIApplicationDelegate protocol has "application:handleOpenURL:" method. And if I implement this method in my ApplicationDelegate class, it will be called when somebody opens my urls. details: http://developer.apple.com/iphone/library/documentation/uikit/reference/UIA...

objective C Basic question

hi friends, i made a simple application using view based template.and i put only nslog inside view didload method in viewController file and also inside applicationDidFinishLaunch method (in appDelegate )to checked which class file called first. after the run i got: viewController Run first and then appdelegate ..but i think appdele...

Is NSMainNibFile a required setting?

If I plan to programmatically create my views, can I build an iOS application without a main nib file? If so, how do I tell UIApplication what my app delegate is? ...

Making multiple service calls on iPhone app initialization

I need to make multiple asynchronous service calls in the application:didFinishLaunchingWithOptions: method from my application delegate in order to retrieve some data from a service to be used across various controllers in my app. I have control over the service, and I've designed the API to be as RESTful as possible, so I need to make ...

Handling applicationDidBecomeActive

I have the UIApplicationDelegate protocol in my main AppDelegate.m class, with the applicationDidBecomeActive method defined. I want to call a method when the application returns from the background, but the method is in another view controller. How can I check which view controller is currently showing in the applicationDidBecomeActiv...