iPhone屏幕旋转的例子
2010-11-05 00:53:50 来源:WEB开发网先在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;
@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]))
- ››iphone图片拉伸的几种方法
- ››iphone正则表达式的简单使用
- ››iPhone开发Unresolved Symbols CAKeyframeAnimati...
- ››IPhone开发-“此证书是由未知颁发机构签名”解决方...
- ››IPhone开发-整合私钥和证书,生成.p12文件
- ››iPhone应用开发-UIPickerView选取器详解
- ››iphone 获取屏幕的宽度和高度
- ››iPhone读取工程包中的二进制文件
- ››iPhone新手机 不挂YouTube APP
- ››iPhone 获取指定格式的时间和日期
- ››iPhone版PPS走进生活 观赏体验媲美PC版
- ››iPhone两种不同的应用程序:两种方法的哲学思想
更多精彩
赞助商链接