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这两个开发框架.不同的框架,往往不仅仅使用不同的架构风格,同时社区活跃度不同,各种功能模块 ...
随机推荐
- 简单C#文字转语音
跟着微软走妥妥的,C#文字转语音有很多参数我就不说了,毕竟我也是初学者.跟大家分享最简单的方法,要好的效果得自己琢磨喽: 先添加引用System.Speech程序集: using System; us ...
- Nodejs解析HTML网页模块 jsdom
工作需要抓取某些网页,所以今天试用下了node下的jsdom模块.同样功能的还有jquery jsdom https://npmjs.org/package/jsdom API很简单. jsdom.e ...
- Oracle存储过程返回一张表数据
在oracle数据库中你要在程序里得到一张表的数据就必须先创建游标和SQL Service不一样. --创建游标create or replace package pkg_Dataas type re ...
- JavaSE思维导图(六)
- 选择器,$("A+B") 和$("A~B") 的理解
在我发表这个理解之前,我有看过博客园 永恒浪子 大神的 JQuery选择器大全(http://www.cnblogs.com/hulang/archive/2011/01/12/1933771.htm ...
- javascript中this指针的认识
javascript中上下文环境就是this指针,即被调用函数所处的环境.这个上下文环境在大多数情况下指的是函数运行时封装这个函数的那个对象:当不通过任何对象单独调用一个函数时,上下文环境指的就是全局 ...
- Chrome NativeClient创建 (转)
Chrome NativeClient创建 该demo目标是让chrome扩展启动本地exe 1创建一个名叫nativeMsgDemo的控制台程序 #include <Windows.h> ...
- G - 好老师
G - 好老师 Time Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu Submit Statu ...
- Problem B: 最少步数
DescriptionA friend of you is doing research on theTraveling Knight Problem (TKP) where you are to f ...
- 64bits Python2.7.5安装numpy包
由于数值分析需要numpy计算包,我找了很多numpy-cp27的下载地址,下了最新版的.whl文件,但总是安装不成功,后来找到一个.exe文件 直接下载安装即可使用:下面是网址链接http://do ...