iPhone常用控件、UIActionSheet、UIAlertView
2010-12-18 08:05:25 来源:WEB开发网示例:
视图有一个UISegmentedControl,"Switches"下有两个UISwitch
"Button"下有一个“Do Something"的UIButton
触摸"Do Something"Button时弹出UIActionSheet
触摸选择"Yes,I'm sure."时弹出 UIAlertView
OBJECTIVE-C CODE :UntitledViewController.h
// UntitledViewController.h
// Untitled
//
// Created by Elf Sundae on 11/10/10.
// Copyright 2010 www.cnBlogs.com/ElfSundae. All rights reserved.
//
#import
#define kSegmentIndex_Switches 0
#define kSegmentIndex_Button 1
@interface UntitledViewController : UIViewController
{
UISwitch * leftSwitch;
UISwitch * rightSwitch;
UIButton * doSomethingButton;
}
@property (retain, nonatomic) IBOutlet UISwitch *leftSwitch;
@property (retain, nonatomic) IBOutlet UISwitch *rightSwitch;
@property (retain, nonatomic) IBOutlet UIButton *doSomethingButton;
- (IBAction) switchChanged: (id)sender;
- ››iphone图片拉伸的几种方法
- ››iphone正则表达式的简单使用
- ››iPhone开发Unresolved Symbols CAKeyframeAnimati...
- ››IPhone开发-“此证书是由未知颁发机构签名”解决方...
- ››IPhone开发-整合私钥和证书,生成.p12文件
- ››iPhone应用开发-UIPickerView选取器详解
- ››iphone 获取屏幕的宽度和高度
- ››iPhone读取工程包中的二进制文件
- ››iPhone新手机 不挂YouTube APP
- ››iPhone 获取指定格式的时间和日期
- ››控件一:Gallery 之无限循环的问题
- ››控件一:Gallery 之基础用法
更多精彩
赞助商链接