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)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
// Remove seperator inset | |
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) | |
{ | |
[cell setSeparatorInset:UIEdgeInsetsZero]; | |
} | |
// Prevent the cell from inheriting the Table View's margin settings | |
if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) |
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
//Objective C | |
[self.view addSubview:_viewControllerToAdd.view]; | |
_viewControllerToAdd.view.translatesAutoresizingMaskIntoConstraints = NO; | |
UIView *subview = _viewControllerToAdd.view; | |
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[subview]-0-|" | |
options:0 |
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
//Fetches all localisable strings and puts them in .string file, should be executed in top level directory for project | |
find . -name \*.m -o -name \*.h | xargs genstrings -o en.lproj |
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
#ifdef DEBUG | |
#define DebugLog(fmt, ...) NSLog((@" < File:%@, Function:%s, Line:%d > :: " fmt),[[NSString stringWithUTF8String:__FILE__] lastPathComponent], __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#else | |
#define DebugLog(...) | |
#endif |
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
static DataManager* dataManager = nil ; | |
#pragma mark - Singlton instance creation | |
+(void)initialize | |
{ | |
if (!dataManager) | |
{ | |
dataManager = [[DataManager alloc] init] ; | |
} | |
} |
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
-(sqlite3 *) getConnection | |
{ | |
@try | |
{ | |
[connMutex lock]; | |
while (bInUse == YES) | |
{ | |
[connMutex wait]; | |
} |
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
/* Input Data sample | |
SWSearchContact *contactModel = [[SWSearchContact alloc] init]; | |
contactModel.arrPhoneNumbers = [arrPhoneNumbers copy]; | |
contactModel.strFirstName = firstName ? firstName : @""; | |
contactModel.strMiddleName = middleName ? middleName : @""; | |
contactModel.strLastName = lastName ? lastName : @""; | |
[_arrMutContacts addObject:contactModel]; |
OlderNewer