User defined runtime attributes are the hidden gem of Xcode’s Interface Builder. Available since Xcode 4 and iOS 5, they provide the ability to configure properties of a view that you would otherwise be unable to configure in Interface Builder.
mobile
Sniffing mobile device traffic
Today, i want to introduce SquidMan (more info here), a simple Mac OSx sniffer.
[Objc] How to make Flappy Bird like game using Cocos2D
Flappy Bird is a 2013 bird flying game developed in Hanoi by Vietnam-based developer Nguyễn Hà Đông and published by .GEARS Studios, a small, independent game developer also based in Vietnam. It was originally released in May 2013 for the iPhone 5, then updated for iOS6 and later in September 2013. In January 2014, it topped the free category of the American and Chinese iTunes App Stores and later on that month the UK App Store where it was touted as “the new Angry Birds”. It ended January as the most downloaded App on the App Store.
iOS version?
Just a simple memo!
[code autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”][[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch][/code]
[code autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)[/code]
[code autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]if ( SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0") )
{
// do something cool
}[/code]
Stupid trick, but useful!
[Objc] UIAlertView and blocks
A simple UIAlertView category to show an alert view in a simple and more readable way!
Like this:
0x8BADF00D and others crashes
From Wikipedia:
A crash (or system crash) in computing is an event in which a computer or a program (such as a software application or an operating system) ceases to function properly, often exiting after encountering errors. The program responsible may appear to freeze or hang until a crash reporting service documents details of the crash. If the program is a critical part of the operating system kernel, the entire computer may crash, often resulting in a fatal system error. […]
Xcode – power of breakpoints
A collection of useful Xcode debugging technique, using Breakpoints and LLDBdebugger.