小编aks*_*hay的帖子

Local Notificaton在模拟器iOS10.0中无效

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
    askForPermission()  
}

@IBAction func addLocalNotification(_ sender: AnyObject) {

    addLocalNotification()    
}

func addLocalNotification() {

    let content = UNMutableNotificationContent()
    content.title = "iOS10.0"
    content.body = "Hello Buddy"
    content.sound = UNNotificationSound.default()
    // Deliver the notification in five seconds.
    let trigger = UNTimeIntervalNotificationTrigger.init(timeInterval: 5, repeats: false)
    let request = UNNotificationRequest.init(identifier: "FiveSecond", content: content, trigger: trigger)
    // Schedule the notification.
    let center = UNUserNotificationCenter.current()
    center.add(request) { (error) in …
Run Code Online (Sandbox Code Playgroud)

swift3 unusernotificationcenter

4
推荐指数
1
解决办法
2501
查看次数

如何检查给定的字符位于Swift 3.0中的A到Z之间?

我的问题是一元运算符不在Swift 3.0下面是我的代码片段.

func  checkCharacter(x: Character)  {
   if x >= "a" || x <="z"{
   }
}
Run Code Online (Sandbox Code Playgroud)

如何检查给定的字符位于swift 3.0中的a到z之间

ios swift swift3

3
推荐指数
1
解决办法
920
查看次数

标签 统计

swift3 ×2

ios ×1

swift ×1

unusernotificationcenter ×1