3_Guess Fingers
3
//
// ViewController.swift
// Guess Fingers
//
// Created by ZC on 16/1/8.
// Copyright © 2016年 ZC. All rights reserved.
// import UIKit class ViewController: UIViewController { @IBOutlet weak var UserGuessTextField: UITextField! @IBOutlet weak var Result: UILabel! @IBAction func Check(sender: AnyObject) { let rand = String(arc4random_uniform(6)) if UserGuessTextField.text?.isEmpty == true {
Result.text = "Please input your guess number!"
}else if UserGuessTextField.text == rand {
Result.text = "Great! The number is " + rand
}else {
Result.text = "Sorry, the correct number is " + rand + " !"
}
} override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
} override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
} }
3_Guess Fingers的更多相关文章
- 动态规划-Minimum Distance to Type a Word Using Two Fingers
2020-01-12 18:28:13 问题描述: 问题求解: 本题还是非常困难的,至少我在看到这个题目的时候是没有想到怎么解决的.我当时联想到的题目是那条grid走两遍的题目,那条题目也很麻烦,使用 ...
- Why AlloyFinger is so much smaller than hammerjs?
AlloyFinger is the mobile web gesture solution at present inside my company, major projects are in u ...
- Appium python API 总结
Appium python api 根据testerhome的文章,再补充一些文章里面没有提及的API [TOC] [1]find element driver 的方法 注意:这几个方法只能通过sel ...
- Appium_Python_Api文档
1.contextscontexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的控 ...
- Chrome 开发者工具(DevTools)中所有快捷方式列表
Chrome DevTools提供了一些内置的快捷键,开发者利用这些快捷键可以节省常工作中很多日的开发时间.下面列出了每个快捷键在Windows/Linux及Mac中的对应键.其中一些快捷键对于Dev ...
- Codeforces Round #361 (Div. 2) A
A - Mike and Cellphone Description While swimming at the beach, Mike has accidentally dropped his ce ...
- jGestures: jQuery的手势事件插件
官网地址:http://jgestures.codeplex.com/文档版本号: v0.7,由neuedigitale编辑,2012年5月8日最新稳定版: jGestures v0.90 - sha ...
- Finger Trees: A Simple General-purpose Data Structure
http://staff.city.ac.uk/~ross/papers/FingerTree.html Summary We present 2-3 finger trees, a function ...
- 老司机学新平台 - Xamarin Forms开发框架之MvvmCross插件精选
在前两篇老司机学Xamarin系列中,简单介绍了Xamarin开发环境的搭建以及Prism和MvvmCross这两个开发框架.不同的框架,往往不仅仅使用不同的架构风格,同时社区活跃度不同,各种功能模块 ...
随机推荐
- Ubuntu启动、停止、重新启动MySQL,查看MySQL错误日志、中文编码错误
1)启动: sudo /etc/init.d/mysql start 2)停止: sudo /etc/init.d/mysql stop 3)重新启动: sudo /etc/init.d/mysql ...
- oracle表设置主键自增长
create or replace table TBL_SYS_USER ( user_id NUMBER(19) not null, user_name ...
- java 对象数组定义
下面代码实现了定义一个数组对象 public class Student { private String username; private int num; public Student(Stri ...
- NET项目反编译+VS解决方案整理流程
net项目反编译 工具:De4Dot + IL SPY和Reflector结合使用 项目:vs10+创建解决方案,每个类库尽量按照dll名来命名,方便整合,新建web项目先把aspx等文件拷贝进去,注 ...
- Excel VLOOKUP等使用记录
1.LEFT 函数:LEFT(G2,ROW(INDIRECT("76:"&LEN(G2)))) 截取G2单元格从开头,SIZE=76的部分字符串 2.RIGHT 函数:RI ...
- Delphi 2010下载+完美破解
点击链接进入http://altd.embarcadero.com/download/RADStudio2010/delphicbuilder_2010_3615_win.isoRAD Studio/ ...
- 一步一步Asp.Net MVC系列_权限管理总结(附MVC权限管理系统源码)
在上一节中我们总结了关于权限控制的方式,我们这一节讲解关于权限控制中角色权限的授予处理等等并做本系列的总结. 首先,我们来谈谈权限控制中角色权限的控制,上一节只是针对权限拦截中比较粗的控制,如果我们需 ...
- Android 五大布局(LinearLayout、FrameLayout、AbsoulteLayout、RelativeLayout、TableLayout )
前言 欢迎大家我分享和推荐好用的代码段~~ 声明 欢迎转载,但请保留文章原始出处: CSDN:http://www.csdn.net ...
- JavaFx初探
由于项目的须要,实在是没有办法了,试了非常多种方案(RCP,SWT,Flex,Smartinvoke...),终于还是决定開始研究JavaFx...为了给用户更好地体验我们的"智能家居&qu ...
- 关于css的默认宽度
<div class="boxa"> <div class="boxb">我是div</div> </div> ...