我想在目标c中搜索字符串数组中的特定字符串.有人可以在这方面帮助我吗?
我想得到日期,NSDate不需要时间.例:
NSDate* today = [NSDate date]; // want to give 20-06-2012 only
Run Code Online (Sandbox Code Playgroud)
我想在没有显示时间的情况下获取今天的日期,并在NSDate变量或字符串变量中使用它.
尝试对我的 ionic 项目实施应用内购买。不确定该选择哪一个,两者的资源都有限。
我找到了这些教程:
应用内购买:https : //alexdisler.com/2016/02/29/in-app-purchases-ionic-cordova/
应用内购买2:
有没有比另一个更受欢迎的?我正在使用 Ionic 3,但不确定从哪里开始。
编辑:根据@franswa 的建议添加了应用内购买2 的第二个链接
这个问题已经在 SO 上得到了回答。这是参考:
但到目前为止我已经尝试过:
var fortnightPart1 = DateComponents()
fortnightPart1.weekday = Calendar.current.component(.day, from: Sdate) //(Day..here Sunday)
fortnightPart1.weekdayOrdinal = 2 //= n == (nth Day in the month...here 2nd Sunday in every month month)
fortnightPart1.hour = Calendar.current.component(.hour, from: Sdate)
fortnightPart1.minute = Calendar.current.component(.minute, from: Sdate)
fortnightPart1.second = Calendar.current.component(.second, from: Sdate)
trigger = UNCalendarNotificationTrigger(dateMatching: fortnightPart1, repeats: repeate)
Run Code Online (Sandbox Code Playgroud)
我无法在 14 天后实现它。虽然,它来自一个随机数据。任何人都可以检查代码有什么问题吗?
更新:
根据您的建议(/sf/answers/3225074821/),这是最终有效的代码!
//for 1st time notification
let center = UNUserNotificationCenter.current()
let content = UNMutableNotificationContent()
content.title = title
content.body = body …Run Code Online (Sandbox Code Playgroud) calendar uilocalnotification swift3 unnotificationrequest unnotificationtrigger