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

从电子邮件链接打开iPhone应用程序

我正在开发一个程序,向用户发送电子邮件,并在电子邮件中嵌入打开iPhone应用程序的链接.问题是,当用户单击链接打开应用程序时,邮件已删除冒号,因此链接不再有效!

创建的链接基本上如下所示:

@"<BR><BR><BR><A HREF=\"http://myApp://\">Open App</A>"
Run Code Online (Sandbox Code Playgroud)

但是,当点击电子邮件时,该链接会在浏览器中打开:

对myApp //

没有冒号,所以应用程序没有启动,浏览器说它找不到页面.

任何想法如何解决这一问题?谢谢!

email iphone hyperlink launch

8
推荐指数
1
解决办法
6480
查看次数

如何使用Swift NSTimer调用其选择器来修复错误

我收到运行时错误:

2014-07-15 16:49:44.893 TransporterGUI [1527:303] - [_ TtC14TransporterGUI11AppDelegate printCountdown]:无法识别的选择器发送到实例0x10040e8a0

当我使用以下Swift代码来触发计时器时:

@IBAction func schedule(sender : AnyObject) {

    var startTime = startDatePicker.dateValue.timeIntervalSinceDate(NSDate())
    var endTime = endDatePicker.dateValue.timeIntervalSinceDate(startDatePicker.dateValue)
    var startDate = NSDate.date()
    let params = ["startTime": startTime, "startDate": startDate]

    var counter = NSTimer.scheduledTimerWithTimeInterval(1.0, target:self, selector:Selector("printCountdown"),
        userInfo:params, repeats:true)
}

func printCountdown(timer: NSTimer) {

    var userInfo = timer.userInfo as NSDictionary
    var startTime = userInfo["startTime"] as NSTimeInterval
    var startDate = userInfo["startDate"] as NSDate

    var elapsedTime: NSTimeInterval = NSDate.date().timeIntervalSinceDate(startDate)
    var remainingTime: NSTimeInterval  =  startTime - elapsedTime;

    if (remainingTime …
Run Code Online (Sandbox Code Playgroud)

parameters runtime-error nstimer swift

5
推荐指数
1
解决办法
2319
查看次数

标签 统计

email ×1

hyperlink ×1

iphone ×1

launch ×1

nstimer ×1

parameters ×1

runtime-error ×1

swift ×1