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)centerViewGroupInY:(NSArray *)views withFixedSpace:(CGFloat)space options:(NSLayoutFormatOptions)options | |
{ | |
if (![views count]) | |
return; | |
NSMutableString *mutableConstraint = [@"V:|[topSpacer(==bottomSpacer)]" mutableCopy]; | |
UIView *topSpacer, *bottomSpacer; | |
NSDictionary *metrics = @{@"space":@(space)}; | |
NSMutableDictionary *viewsMutableDictionary = [NSMutableDictionary dictionary]; | |
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
__weak typeof(self) weakSelf = 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
- (NSRange)rangeOfRegularExpressionPattern:(NSString *)pattern inString:(NSString *)string | |
{ | |
NSRegularExpression *expression = [NSRegularExpression regularExpressionWithPattern:pattern options:nil error:nil]; | |
NSTextCheckingResult *result = [expression firstMatchInString:string options:nil range:NSMakeRange(0, [string length])]; | |
return result.range; | |
} |
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
__weak typeof(self) weakSelf = self; |
NewerOlder