LoginSignup
9
9

More than 5 years have passed since last update.

Objective-Cでiosアプリ開発 おれおれスペニット

Last updated at Posted at 2012-07-19

Function Menu を整理する

#pragma mark - HogeFugo -

任意のコードからAppDelegateを参照する

  AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];

deallocではrelease後に確実にnilにしておくこと

- (void) dealloc
{
    [_var release], _var = nil;
}

I18n参照

[self setTitle:NSLocalizedString(@"key_for_your_string", "explain for this string")];

UIWebViewのUserAgentを指定

AppDelegateのinitializeでしか変えられない。

# AppDelegate.m
+ (void)initialize 
{
    NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys:@"your_user_agent", @"UserAgent", nil];
    [[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];

}

gist

9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9