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

3_Guess Fingers的更多相关文章

  1. 动态规划-Minimum Distance to Type a Word Using Two Fingers

    2020-01-12 18:28:13 问题描述: 问题求解: 本题还是非常困难的,至少我在看到这个题目的时候是没有想到怎么解决的.我当时联想到的题目是那条grid走两遍的题目,那条题目也很麻烦,使用 ...

  2. 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 ...

  3. Appium python API 总结

    Appium python api 根据testerhome的文章,再补充一些文章里面没有提及的API [TOC] [1]find element driver 的方法 注意:这几个方法只能通过sel ...

  4. Appium_Python_Api文档

    1.contextscontexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的控 ...

  5. Chrome 开发者工具(DevTools)中所有快捷方式列表

    Chrome DevTools提供了一些内置的快捷键,开发者利用这些快捷键可以节省常工作中很多日的开发时间.下面列出了每个快捷键在Windows/Linux及Mac中的对应键.其中一些快捷键对于Dev ...

  6. Codeforces Round #361 (Div. 2) A

    A - Mike and Cellphone Description While swimming at the beach, Mike has accidentally dropped his ce ...

  7. jGestures: jQuery的手势事件插件

    官网地址:http://jgestures.codeplex.com/文档版本号: v0.7,由neuedigitale编辑,2012年5月8日最新稳定版: jGestures v0.90 - sha ...

  8. 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 ...

  9. 老司机学新平台 - Xamarin Forms开发框架之MvvmCross插件精选

    在前两篇老司机学Xamarin系列中,简单介绍了Xamarin开发环境的搭建以及Prism和MvvmCross这两个开发框架.不同的框架,往往不仅仅使用不同的架构风格,同时社区活跃度不同,各种功能模块 ...

随机推荐

  1. 从零开始Unity3D游戏开发【3烘焙】

    烘焙:通过烘焙能把动态场景转化为静态场景.从而提高游戏的性能. [烘焙步骤] 1.Edit---Player---Rendering[forword] 2.Directional light(必须是这 ...

  2. JavaScript值延迟脚本和异步脚本

    Html 4.0为<script>标签定义了defer属性,这个属性的用途是表名脚本在执行时,不会影响页面的构造.也就是说,脚本会延迟到整个页面解析完毕之后在运行,因此,在<scri ...

  3. Facebook、新浪微博、Twitter、腾讯微博分享代码

    最近总结一下用到的分享代码 FaceBook分享 <a href="https://www.facebook.com/sharer/sharer.php?u=你的链接" ta ...

  4. nginx install

    ./configure --prefix=/home/allen.mh/local/nginx --with-http_ssl_module --with-http_sub_module --with ...

  5. PHP查询MYSQL表的主键

    $sql = "SELECT * from Person"; $result = mysql_query($sql,$con); while ($property = mysql_ ...

  6. halcon与C#混合编程

    halcon源程序: dev_open_window(0, 0, 512, 512, 'black', WindowHandle)read_image (Image, 'C:/Users/BadGuy ...

  7. C#对象赋值出现的诡异问题,或许你也遇到过,有待你的解决

    前言:今天在代码中,又出现了这个问题,就是对象赋值给一个新的对象时,然后更改新对象中的属性,就会把老对象的值也更改,以前也遇到这个问题,只是没有深究,今天刚好又遇到了此问题,我决定写下来,和大家一起分 ...

  8. Spring jdbctemplate学习笔记

    /*List<?> config = getDB(" select t.datavalue from sys_config t where t.configid = '15' & ...

  9. Windows Server 2012 R2 Standard序列号

    备用一个吧,免得用起来的时候找不到. NB4WH-BBBYV-3MPPC-9RCMV-46XCB

  10. Intellij IDEA + Android SDK + Genymotion Emulator打造最佳Android开发

    原文:Intellij IDEA + Android SDK + Genymotion Emulator打造最佳Android开发 Intellij IDEA + Android SDK + Geny ...