一些简单记录

来源:互联网 发布:java.util.base64加密 编辑:程序博客网 时间:2024/05/18 09:49



1:Xcode设置横竖屏

RootViewController.mm文件里找到   - (NSUInteger) supportedInterfaceOrientations方法。如果想让程序是竖屏,直接return 

UIInterfaceOrientationMaskPortrait。横屏是默认的,当然也可以选择别的,自己跟到源码里找,应该不难。

大概是以下几个

UIInterfaceOrientationMaskPortrait 
= (1 <<UIInterfaceOrientationPortrait),
  
  UIInterfaceOrientationMaskLandscapeLeft = (1 
<<UIInterfaceOrientationLandscapeLeft),
  
  UIInterfaceOrientationMaskLandscapeRight = (1 
<<UIInterfaceOrientationLandscapeRight),
  
  UIInterfaceOrientationMaskPortraitUpsideDown = (1 
<<UIInterfaceOrientationPortraitUpsideDown),
    
UIInterfaceOrientationMaskLandscape = 
(UIInterfaceOrientationMaskLandscapeLeft 
| UIInterfaceOrientationMaskLandscapeRight),
    
UIInterfaceOrientationMaskAll = (UIInterfaceOrientationMaskPortrait | 
UIInterfaceOrientationMaskLandscapeLeft |         
  UIInterfaceOrientationMaskLandscapeRight 
| UIInterfaceOrientationMaskPortraitUpsideDown),
    
UIInterfaceOrientationMaskAllButUpsideDown = 
(UIInterfaceOrientationMaskPortrait | 
UIInterfaceOrientationMaskLandscapeLeft | 

  UIInterfaceOrientationMaskLandscapeRight)


2:xcode中一些快捷键

command+r  相当于′F5, 运行

command+.  停止调试

control+command+Y相当于vs中得F5

fn+F6 相当于vs中得F10,单步调试

fn+F7 相当于vs中得F11,进入代码内部调试


command +/  给选中代码块改为注释(再来一次改回来)


control + command + 箭头(<-    ->)cpp与头文件之间的切换


原创粉丝点击