As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| UIDeviceOrientation actualDeviceOrientation = [[UIDevice currentDevice] orientation]; | |
| BOOL changedDeviceOrientation = NO; | |
| if ((self.supportedInterfaceOrientations & (UIInterfaceOrientationMaskLandscapeLeft|UIInterfaceOrientationMaskLandscapeRight)) == 0) | |
| { | |
| if (UIScreen.mainScreen.bounds.size.width > UIScreen.mainScreen.bounds.size.height) // Device is in landscape orientation | |
| { | |
| [[UIDevice currentDevice] setValue:@(UIDeviceOrientationPortrait) forKey:@"orientation"]; | |
| changedDeviceOrientation = YES; | |
| } |
iOS 7 代码布局适配:坐标起点 iOS 7 中 UIViewController 使用了全屏布局的方式,也就是说导航栏和状态栏都是不占实际空间的,状态栏默认是全透明的,导航栏默认是毛玻璃的透明效果。例如在一个 view 中加入:
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0,0,100,100)];
[label setBackgroundColor:[UIColor greenColor]];
[self.view addSubview:label];上面代码加在没有 UINavigationController 作为 rootViewController 的情况下,得到的效果是:
| # This is not a ready-to-run script. It just shows the relevant command-line calls. | |
| XC_WORKSPACE=path/to/MyApp.xcworkspace | |
| XC_SCHEME=MyApp | |
| XC_CONFIG=Release | |
| ARCHIVE_PATH=dest/path/to/MyApp.xcarchive | |
| EXPORT_PATH=dest/path/to/MyApp.ipa | |
| DIST_PROFILE=NameOfDistributionProfile | |
| # Build and archive. This can be done by regular developers, using their developer key/profile. |
| #!/bin/sh | |
| # | |
| # Copyright (c) 2010 Warren Merrifield | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |