This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>__IAWRITER_DOCUMENT_TITLE__</title> | |
<meta name="author" content="__IAWRITER_USER_NAME__"> | |
<meta name="generator" content="iA Writer for Mac __IAWRITER_BUNDLE_VERSION__"> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// WGenServer.h | |
// WgenTestCommon | |
// | |
// Created by Sebastian Windal on 10/24/12. | |
// Copyright (c) 2012 Sebastian Windal. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "WGenPeer.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// WGenServer.m | |
// WgenTestCommon | |
// | |
// Created by Sebastian Windal on 10/24/12. | |
// Copyright (c) 2012 Sebastian Windal. All rights reserved. | |
// | |
#import "WGenServer.h" | |
#import "GCDAsyncSocket.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// what do you get? | |
// compile error? | |
// compile warning? | |
// runtime crash? | |
// value X displayed on console. | |
// 1. | |
NSString *str1 = @"hello"; | |
NSLog(@"%d", [str1 length]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)myButtonAction:(id)sender { | |
UIButton *myButton = (UIButton *) sender; | |
if (myButton.tag == 1) { | |
// do X | |
} | |
else if (myButton.tag == 2) { | |
// do Y | |
} | |
else if (myButton.tag == 3) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation MyView2 | |
- (id)initWithFrame:(CGRect)frame | |
{ | |
self = [super initWithFrame:frame]; | |
if (self) { | |
// Initialization code | |
} | |
return self; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation ViewController3 | |
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | |
{ | |
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | |
if (self) { | |
// Custom initialization | |
} | |
return self; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|I Want to:|init(s)|lazy loading|viewDidLoad|viewWillAppear| | |
|----------|-------|------------|-----------|--------------| | |
|Initialize obj-c objects (array, dictionaries, etc...)| X | | | | | |
|Initialize C stuff (C buffer, etc...)|X||||| | |
|Setup UI stuff in code that is not layout related (UILabel fonts, texts, etc...)|||X|| | |
|Adjust layout of elements in code, reposition things around||||X| | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+(void) DoNotUseNSLog_It:(NSString *)format, ... | |
{ | |
// call AMPDebug or whatever... | |
AMPDebug(blah blah | |
} | |
+(void) DoNotUseNSLog_It:(NSString *)format, ... __attribute__ ((deprecated)); | |
#define NSLog(s, ...) [YourLogginClass DoNotUseNSLog_It:(s, ##__VA_ARGS__)]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* style 1 */ | |
#myText { | |
background-color: red; | |
} | |
/* style 2 */ | |
#myText:hover { | |
background-color: blue; | |
} |
OlderNewer