当前位置: 首页 > 编程日记 > 正文

IOS问题汇总:2012-12-18 UIAlertView+UIActionSheet

UIAlertView/UIActionSheet

UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@“添加场景模式” message:@“请输入场景名称” delegate:self cancelButtonTitle:@“取消” otherButtonTitles:@“确定”, nil];
alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField * tf = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, alertView.frame.size.width, 44)];

    tf.borderStyle = UITextBorderStyleRoundedRect;/*    UITextBorderStyleNone,UITextBorderStyleLine,UITextBorderStyleBezel,UITextBorderStyleRoundedRect*///        tf.placeholder = detailText;//        NSLog(@"tf.text--%@",tf.text);//        tf.delegate = self;//        tf.borderStyle = UITextBorderStyleRoundedRect;[alertView addSubview:tf];[alertView show];

——alertView自动消失
-(void) performDismiss:(NSTimer *)timer
{
[Alert dismissWithClickedButtonIndex:0 animated:NO];
[Alert release];
}

-(void)presentSheet
{
Alert = [[UIAlertView alloc] initWithTitle:@“警告” message:@“出错啦!” delegate:self cancelButtonTitle:nil otherButtonTitles:nil, nil];

[NSTimer scheduledTimerWithTimeInterval:2.0f target:self selector:<a href="http://www.twitter.com/selector">@selector</a>(performDismiss:) userInfo:nil repeats:NO];
[Alert show];

}

UIActionSheet *as = [[UIActionSheet alloc]initWithTitle:[NSString stringWithFormat:@“添加%@”,actionSheetTitle] delegate:self cancelButtonTitle:@“取消” destructiveButtonTitle:nil otherButtonTitles:actionSheetButtonTitle ,nil];

    /*UIActionSheetStyleAutomatic        = -1,       // take appearance from toolbar style otherwise uses 'default'UIActionSheetStyleDefault          = UIBarStyleDefault,UIActionSheetStyleBlackTranslucent = UIBarStyleBlackTranslucent,UIActionSheetStyleBlackOpaque      = UIBarStyleBlackOpaque,*///    as.actionSheetStyle = UIActionSheetStyleBlackOpaque;[as showInView:self.view];

转载于:https://www.cnblogs.com/hanyutong/p/4425196.html

相关文章:

PHP入门 1 phpstudy安装与配置站点

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 1&#xff0c; 一键安装 phpstudy &#xff1b; 点击跳转下载&#xff1b; 2.配置站点&#xff0c;点击MySQL 其它选项菜单的站点域名管理&#xff1b;再点击新增 2&#xff0c;点击其他选项菜单点击打开…

singleton设计模式_让我们研究一下Singleton设计模式的优缺点

singleton设计模式by Navdeep Singh通过Navdeep Singh 让我们研究一下Singleton设计模式的优缺点 (Let’s examine the pros and cons of the Singleton design pattern) Design patterns are conceptual tools for solving complex software problems. These patterns are si…

【转】MFC消息映射详解(整理转载)

消息&#xff1a;主要指由用户操作而向应用程序发出的信息&#xff0c;也包括操作系统内部产生的消息。例如&#xff0c;单击鼠标左按钮&#xff0c;windows将产WM_LBUTTONDOWN消息&#xff0c;而释放鼠标左按钮将产生WM_LBUTTONUP消息&#xff0c;按下键盘上的字母键&#xff…

php 2 往数据库添加数据

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 前端代码&#xff1a; function submit_result() { $.post("Controllers/ajaxController.php",{"name": $("#name").val(),"mobile": $("#mo…

设计模式:单例

传统的实现方法&#xff1a;两私一公&#xff0c;涉及线程安全问题&#xff08;即使有多重检查锁也可以通过反射破坏单例&#xff09;public class Singleton {private volatile static Singleton instance null;private Singleton () {}public static Singleton getSingleton…

100天59万行代码_如何抽出100天的代码时间

100天59万行代码Life moves pretty fast. If you don’t stop and look around once in a while, you could miss it. — Ferris Bueller生活发展很快。 如果您不停地走动&#xff0c;不时环顾四周&#xff0c;您可能会错过它。 —摩天轮 My time at freeCodeCamp was a fun an…

Mac 安装SecureCRT

scrt-8.0.2-1118.osx_x64.dmg https://pan.baidu.com/s/1miS5XVy 1.下载破解文件 SecureCRT https://pan.baidu.com/s/1eRW5IfS 2. 打开终端执行 chmod x ~/Downloads/SecureCRT 替换破解文件SecureCRT到/Applications/SecureCRT.app/Contents/MacOS/ 3. 打开SecureCRT&#xf…

PHP 3 HTML POST带参数请求 后端返回json格式的数据给前端

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 前端代码 <!DOCTYPE html> <html lang"zh"><head><meta charset"UTF-8"><title>Title</title><script src"https://ajax.aspnetcdn.c…

产品经理入门_所以您想成为产品经理? 这就是我的入门方式。

产品经理入门by Melanie Lei由Melanie Lei 所以您想成为产品经理&#xff1f; 这就是我的入门方式。 (So you want to be a product manager? This is how I got started.) One of the most common questions I get asked is, “How do you get a Product Manager job if you…

又拍云SSL证书全新上线,提供一站式HTTPS安全解决方案

互联网快速发展&#xff0c;云服务早已融入每一个人的日常生活&#xff0c;而互联网安全与互联网的发展息息相关&#xff0c;这其中涉及到信息的保密性、完整性、可用性、真实性和可控性。又拍云上线了与多家国际顶级 CA 机构合作的数款OV & EV SSL证书&#xff0c;提供一站…

HDU 1155 Bungee Jumping

题意&#xff1a;英语水平太次…………读了好久好久好久才读懂OTZ James Bond要逃跑&#xff0c;跑到一个桥边上&#xff0c;要跳到地面&#xff0c;桥边有个有弹性的绳子长度为l&#xff0c;如果他跳下去能到达地面&#xff0c;但速度超过10就会摔死&#xff0c;否则能成功降落…

php 4 创建公共的链接数据库php文件并在其它文件引用它

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 创建公共文件 <? //1. 声明字符编码 header("Content-Type:text/html;charsetutf8"); //2. 连接数据库 $linkmysql_connect("localhost","root","root");/…

异步回调地狱_如何逃避异步/等待地狱

异步回调地狱async/await freed us from callback hell, but people have started abusing it — leading to the birth of async/await hell.async / await使我们从回调地狱中解脱出来&#xff0c;但是人们已经开始滥用它-导致async / await地狱的诞生。 In this article, I …

2015年编程之美(资格赛) ---2月29日

时间限制:2000ms单点时限:1000ms内存限制:256MB描述 给定两个日期&#xff0c;计算这两个日期之间有多少个2月29日&#xff08;包括起始日期&#xff09;。 只有闰年有2月29日&#xff0c;满足以下一个条件的年份为闰年&#xff1a; 1. 年份能被4整除但不能被100整除 2. 年份能…

2016多校赛2 A 数学推公式 E 极角排序,组合数(待补) L dp+bitset优化

2016 Multi-University Training Contest 2 A - Acperience 题意&#xff1a;给出w[]&#xff0c;求S((w[i]-aB[i])^2)的最小值(B[i]为1或-1)。 tags&#xff1a;一看到就搞了个三分上去&#xff0c;估计是精度问题&#xff0c;一直挖&#xff0c;23333。。 就是把这个公式推下…

php No 'Access-Control-Allow-Origin' header is present on the requested resource.'Ajax跨域访问解决方法

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 在PHP请求头加上 header("Access-Control-Allow-Origin: *");

二进制搜索算法_使用安全摄像机镜头解释二进制搜索算法

二进制搜索算法by Julia GeistJulia盖斯特(Julia Geist) 使用安全摄像机镜头解释二进制搜索算法 (Binary Search Algorithms explained using security camera footage) Binary search, also known as half-interval search or logarithmic search, is a search algorithm tha…

Codeforces 460E Roland and Rose(暴力)

题目链接&#xff1a;Codeforces 460E Roland and Rose 题目大意&#xff1a;在以原点为圆心&#xff0c;半径为R的局域内选择N个整数点&#xff0c;使得N个点中两两距离的平方和最大。 解题思路&#xff1a;R最大为30。那么事实上距离圆心距离最大的整数点只是12个最多&#x…

HTML POST提交参数给PHP并返回json,上传execl文件

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文&#xff1a; 需求&#xff1a;AJAX post带参数请求接口&#xff0c;PHP接收后存入数据库&#xff1b;然后返回json数据循环渲染到HTML <!DOCTYPE html> <html lang"zh">&l…

在Ubuntu 12.04 桌面上设置启动器(快捷方式)

在Ubuntu 12.04 桌面上设置启动器&#xff08;快捷方式&#xff09;过程讲解&#xff1a; 如下图所示&#xff0c;Eclipse 和 SQLDeveloper 都可以直接双击打开&#xff0c;这些应用程序的启动器都在 /usr/share/applications文件夹下面&#xff0c;进入后将其复制到桌面即可。…

rxswift中hud_如何在RxSwift中运行测试

rxswift中hudby Navdeep Singh通过Navdeep Singh 如何在RxSwift中运行测试 (How to run tests in RxSwift) RxTest and RxBlocking are part of the RxSwift repository. They are made available via separate pods, however, and so require separate imports.RxTest和RxBlo…

安装完DevExpress14.2.5,如何破解它呢?

DevExpress是一个界面控件套件&#xff0c;提供了一系列的界面控件套件的DotNet界面控件。DevExpress开发的控件有很强的实力&#xff0c;不仅功能丰富&#xff0c;应用简单&#xff0c;而且界面华丽&#xff0c;更可方便订制&#xff0c;方便开发人员开发。 下面介绍DevExpres…

Extjs Ext.TreePanel

TreePanel 简单实例。 <link rel"stylesheet" href"Js/ext-4.2/resources/css/ext-all-neptune.css"/><script src"Js/jQuery/jquery-1.8.2.min.js" type"text/javascript"></script><script src"Js/ext-…

php模糊搜索功能

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文&#xff1a; 前端 前端post请求并发送str参数>搜索的内容&#xff1b; PHP <?phpheader("Content-Type:text/html;charsetutf8"); header("Access-Control-Allow-Origin…

react 快速上手开发_React中测试驱动开发的快速指南

react 快速上手开发by Michał Baranowski通过MichałBaranowski React中测试驱动开发的快速指南 (A quick guide to test-driven development in React) Following the principles of Test-Driven Development (TDD) when writing a front-end React app might seem more dif…

iOS 相册和网络图片的存取

iOS 相册和网络图片的存取 保存 UIImage 到相册 UIKit UIKit 中一个古老的方法&#xff0c;Objective-C 的形式 void UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo); 保存完成后&#xff0c;会调用 comple…

微信小程序实时聊天之WebSocket

微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文&#xff1a; 1.所有监听事件先在onload监听。 // pages/index/to_news/to_news.js var app getApp(); var socketOpen false; var SocketTask false; var url ws://192.168.0.120:7011; Page…

webform repeater

repeater:由模板构成&#xff0c;解析后模板就不存在了 需要指定数据源进行数据绑定 List<Fruit> list new FruitDA().Select(); // 数据查询 &#xff08;随便查寻的&#xff09; Repeater1.DataSource list; // 赋值 Repeater1…

远程协助软件开发_这是我从事远程软件开发人员工作的主要技巧

远程协助软件开发by Colin Morgan通过科林摩根(Colin Morgan) 这是我从事远程软件开发人员工作的主要技巧 (Here are the top tips I’ve used to land a remote software developer job) Applying for a remote software developer job means you are voluntarily choosing t…

简谈-Python一些常用的爬虫技巧

第一种&#xff1a;基本的网页抓取 get方法 import urllib2url "链接response urllib2.urlopen(url)print response.read() post方法 import urllibimport urllib2url "链接form {name:abc,password:1234}form_data urllib.urlencode(form)request urllib2.Req…