首页 > 其他 > 详细

【代码笔记】点击任何处,出现城市

时间:2016-01-11 10:16:56      阅读:175      评论:0      收藏:0      [点我收藏+]

一,效果图。

技术分享

二,工程目录。

技术分享

三,代码。

技术分享
//点击任何处,出现城市
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    UIActionSheet *city=[[UIActionSheet alloc] initWithTitle:@"城市选择" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:@"北京",@"上海",@"天津",@"重庆",@"哈尔滨",@"长春",@"沈阳",@"呼和浩特",@"石家庄",@"乌鲁木齐",@"兰州",@"西安",@"西宁",@"银川",@"郑州",@"济南",@"太原",@"合肥",@"武汉",@"南京",@"成都",@"贵阳",@"昆明",@"南宁",@"拉萨",@"杭州",@"南昌",@"广州",@"福州",@"台北",@"海口",@"香港",@"澳门", nil];
    city.backgroundColor=[UIColor orangeColor];
    [city showInView:self.view];
    
}
技术分享

 

【代码笔记】点击任何处,出现城市

原文:http://www.cnblogs.com/yang-guang-girl/p/5120260.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!