国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

iPho、ne屏幕旋轉的例子

2019-11-02 14:20:55
字體:
來源:轉載
供稿:網友

   先在interface builder上放上6個rectbutton,豎放,一排三個

  然后我們下面來看代碼

  .h文件代碼

  1 //

  2 // AutoSizeViewController.h

  3 // AutoSize

  4 //

  5 // Created by Scott on 10-10-26.

  6 // Copyright 2010 __MyCompanyName__. All rights reserved.

  7 //

  8

  9 #import

  10

  11 @interface AutoSizeViewController : UIViewController {

  12 UIButton *button1;

  13 UIButton *button2;

  14 UIButton *button3;

  15 UIButton *button4;

  16 UIButton *button5;

  17 UIButton *button6;

  18 }

  19

  20 @property (nonatomic,retain) IBOutlet UIButton *button1;

  21 @property (nonatomic,retain) IBOutlet UIButton *button2;

  22 @property (nonatomic,retain) IBOutlet UIButton *button3;

  23 @property (nonatomic,retain) IBOutlet UIButton *button4;

  24 @property (nonatomic,retain) IBOutlet UIButton *button5;

  25 @property (nonatomic,retain) IBOutlet UIButton *button6;

  26 @end

  27

  下面我們看.m的代碼

  //

  // AutoSizeViewController.m

  // AutoSize

  //

  // Created by Scott on 10-10-26.

  // Copyright 2010 __MyCompanyName__. All rights reserved.

  //

  #import "AutoSizeViewController.h"

  @implementation AutoSizeViewController

  @synthesize button1;

邪惡內涵搞笑gif動態圖片[www.62-6.com/1/gaoxiaogif/]

  @synthesize button2;

  @synthesize button3;

  @synthesize button4;

  @synthesize button5;

  @synthesize button6;

  /*

  // The designated initializer. Override to perform setup that is required before the view is loaded.

  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {

  if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]))

  {

  // Custom initialization

  }

  return self;

  }

  */

  /*

  // Implement loadView to create a view hierarchy programmatically, without using a nib.

  - (void)loadView {

  }

  */

  /*

  // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.

  - (void)viewDidLoad {

  [super viewDidLoad];

  }

  */

  // Override to allow orientations other than the default portrait orientation.

  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

  // Return YES for supported orientations

  return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);

  }

  - (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 收藏| 平乡县| 屏边| 龙海市| 平乐县| 红桥区| 拉孜县| 遵义市| 慈利县| 盐城市| 吐鲁番市| 昭觉县| 湖口县| 青岛市| 尤溪县| 周至县| 徐州市| 大理市| 青龙| 吉林省| 开封市| 永福县| 涡阳县| 伊川县| 凌源市| 北京市| 墨江| 蓝山县| 泗阳县| 昔阳县| 安塞县| 宿迁市| 拉孜县| 伊金霍洛旗| 斗六市| 岐山县| 叙永县| 萨迦县| 万山特区| 胶南市| 嘉祥县|