LBNTools 0.1.0

LBNTools 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2016

Maintained by Luciano Bastos Nunes.



LBNTools 0.1.0

  • By
  • Luciano Bastos Nunes

Usage

Include LBNTools.h in your project.

#import "LBNTools.h"

Than you can access all the methods as class methods. No need to instantiete this class.

Requirements

This Tools uses Reachability as a means to check for internet accesss availability.

Installation

LBNTools is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LBNTools"

Methods

+(NSString *)stringAsPlainTextFromString:

Remove escape text from string and return as plain text. Those escaped text is mostly received via HTML pages string.

+(NSError *)errorWithMessage:

A facilitator method that creates a NSError object with a given message.

+(bool)isNetworkAvailable

Make use of reachability class to determine if there is any kind of internet connection.

+(void)roundCorners:borderColor:radius:forView:

Round corners for any view, adding border with especified color. You can define which corner will be rounded using those properties on roundCorners: (UIRectCornerTopLeft | UIRectCornerTopRight | UIRectCornerBottomLeft | UIRectCornerBottomRight)

+(void)roundTopCornersRadius:borderColor:forView:

Round top corners for any view, adding border with especified color.

+(void)roundBottomCornersRadius:borderColor:forView:

Round top corners for any view, adding border with especified color.

+ (bool)canUpdateForTime:andStorePlace:

It records in the storePlace the time this method was last called and check if the given time has been passed sinse the last time it was called.

Time is given in hours and a storePlace is any string that will be used as key to store the value, this away you can have as much time checks as you have storePlaces.

+ (bool)canUpdateTime:andStorePlace:

Only checks if the given time has been passed sinse the last time it was called for the store place.

It works in pair with updateTimeForStorePlace.

+ (void)updateTimeForStorePlace:

Only records in the storePlace the time this method was last called.

It works in pair with canUpdateTime.

+ (NSMutableDictionary *)changeKey:(NSString *)key1 toKey:(NSString *)key2 onDictionary:(NSDictionary *)dic

Chenge key1 name for key2 name in a givien NSDictionary and returns a NSMutableDictionary with the changes.

Author

Luciano Bastos Nunes, [email protected]

License

LBNTools is available under the MIT license. See the LICENSE file for more info.