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实用工具AppBox Pro使用教程大揭秘
- ››iphone4省电方法
- ››iphone 获取地址的详细信息
- ››iPhone 库的基本内存管理策略
- ››iPhone加密文字亲手做 私密信息有保障
- ››iphone 根据经纬度坐标取详细地址(包括国,省,市...
- ››iphone/ipad ios cocoa object-c 近期苹果UI部分小...
- ››iphone中如何进行多线程编程
- ››iPhone OS SDK的这些事[安装、下载、版本、实例、...
- ››iPhone ObjectC的NSAutoreleasePool
- ››iPhone 判断设备是在Portrait(纵向)还是(Landscap...
更多精彩
赞助商链接