TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | BSD |
ReleasedLast Release | Feb 2016 |
Maintained by Wantoto, sodastsai.
JSONKit is dead. Thus we use NSJSONSerialization
which comes after
iOS 5.
For string and data:
For array and dictionary:
Check BenzeneFoundation/BFDefines.h
for all macros we provide.
Error output
iOS Version Checking
For example, you can use
IOS_IS_NEWER_THAN_OR_EQUALS_TO_7_0
to call new API in iOS 7. According to Apple's documentation, you are recommended to check class existence or method respondence first before using this version check directly.
Float equal and zero
Compare float value with
FLT_EPSILON
It's more powerful thanNSLog
. It prints the method name, file name, and line number
of this BFLog
call when printing the log message
It's useful when your third party code keeps printing garbage NSLog
.
#define NSLog
And use BFLog
and BFSimpleLog
(which is the same as NSLog)
A category for NSFileManager which provides a quick link to find paths at user domain. It provides:
For example, global library path gives you
<# APP_SANDBOX_ROOT #>/Library
and local one gives
<# APP_SANDBOX_ROOT #>/Library/com.example.your.app.id
A dictionary which resets (clean) its value to default value whenever user leaves and comes back to the app.
You can also set a time interval. The dictionary is reset only when user leaves your app and comes back after the time interval passed.
Default Session:
@{ @"dataLoaded": @(NO) }
, 30min Session:@{ @"dataLoaded": @(NO) }
And now the data has been loaded
Default Session:
@{ @"dataLoaded": @(YES) }
, 30min Session:@{ @"dataLoaded": @(YES) }
Then user leaves the app and comes back in 15 mins
Default Session:
@{ @"dataLoaded": @(NO) }
, 30min Session:@{ @"dataLoaded": @(YES) }
Zoom image view with UIScrollView and UITapGestureRecognizer
Bi-directional pull to refresh control
Text view with place holder
Block edition of NSUncaughtExceptionHandler. It also provides runtime information like call stack, device info, and app info to you. Btw, it also calls previously set NSUncaughtExceptionHandler.
Categories for NSString and NSDictionary to do URL encoding/decoding
Check BenzeneFoundation/BFURLEncoding.h
Provide view controller container segue available from iOS 6 to iOS 5.