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
run these 2 lines in terminal: | |
1: | |
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID | |
2: | |
defaults delete com.apple.dt.Xcode DVTPlugInManagerNonApplePlugIns-Xcode-7.1 | |
3: | |
restart xcode! |
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
CATextLayer *textLayer; | |
textLayer.contentsScale = 2; |
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
- (NSString *)formatNumberDecimal{ | |
if(self){ | |
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; | |
formatter.numberStyle = NSNumberFormatterDecimalStyle; | |
[formatter setMaximumFractionDigits:2]; | |
NSString *string = @"0"; | |
if([self multipleLongForNumber]){//long | |
string = [formatter stringFromNumber:[NSNumber numberWithLong:[self longValue]]]; | |
}else{//double | |
string = [formatter stringFromNumber:[NSNumber numberWithDouble:[self doubleValue]]]; |
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
$node -v | |
dyld: bad external relocation length | |
[1] 46368 trace trap node -v | |
$ sudo n latest |
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
[UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^(void){ | |
self.tableView.contentOffset = CGPointMake(0, -self.refresh.frame.size.height); | |
} completion:^(BOOL finished) { | |
[self.refresh beginRefreshing]; | |
[self loadProductsList]; | |
}]; |
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
git=`sh /etc/profile; which git` | |
appBuild=`"$git" rev-list --count HEAD` | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $appBuild" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | |
echo "Updated ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" |
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:)]) { | |
[cell setPreservesSuperviewLayoutMargins:NO]; | |
} |
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)viewWillAppear:(BOOL)animated{ | |
[super viewWillAppear:animated]; | |
CGPoint contentOffset = self.tableView.contentOffset; | |
contentOffset.y += CGRectGetHeight(self.tableView.tableHeaderView.frame); | |
self.tableView.contentOffset = contentOffset; | |
} | |
- (void)viewDidAppear:(BOOL)animated{ | |
[super viewDidAppear:animated]; |
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
UINavigationItem *item = self.navigationController.navigationBar.topItem; | |
item.title = @""; |
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
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES |
OlderNewer