0x00
*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'preferredInterfaceOrientationForPresentation 'landscapeLeft' must match a supported interface orientation: 'portrait, landscapeRight'!'
0x01
所支持的方向是一個(gè)集合
當(dāng)前設(shè)備方向
應(yīng)該是集合中的一個(gè)值
/// 當(dāng)前方向
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
if (hengping) {
return UIInterfaceOrientationLandscapeRight;
}else{
return UIInterfaceOrientationPortrait;
}
}
/// 所支持的方向
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeRight;
}
畫線,畫虛線,畫五角星,畫矩形,畫虛線矩形,漸變色
https://github.com/xjh093/JHDraw