小编W.M*_*W.M的帖子

6
推荐指数
3
解决办法
7942
查看次数

启动Screen.storyboard无法正常工作Xcode 7

我在Xcode 7中使用Launch Screen故事板来支持iOS 9,并使用imageSet来支持iOS 7.

UIImageView在全屏幕上放入LaunchView的第一件事,并在源头使用下面的图像(见图像)到该imageView,但是当我在模拟器中运行我的应用程序时,此图像无法正确显示(iPhone 4s,5,6和6 plus)

在此输入图像描述

问题出在哪儿?

有人可以帮忙吗?

iphone ios ios9

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

Swift 每 5 天重复一次 LocalNotification

如何在上午 10:00 每 5 天重复一次 LocalNotification

我试试这个,但它不起作用

let content = UNMutableNotificationContent()
content.title = "Hello!"
content.body = "Hello_message_body"
content.sound = UNNotificationSound.default()

let futureTime = Date().addingTimeInterval(5 * 24 * 60 * 60)
var calendar = NSCalendar.current
calendar.timeZone = NSTimeZone.system
var components = calendar.dateComponents([.hour, .minute, .second], from: futureTime)
components.hour = 10
components.minute = 0
components.second = 0

let trigger = UNCalendarNotificationTrigger(dateMatching: components, repeats: true)
let request = UNNotificationRequest(identifier: "FiveDays", content: content, trigger: trigger)
let center = UNUserNotificationCenter.current()
center.add(request)
Run Code Online (Sandbox Code Playgroud)

ios localnotification swift unusernotificationcenter

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