小编Pei*_* Li的帖子

在cordova中,如何导航到另一个html页面?

我目前正在使用Visual Studio中的Cordova项目.在这个项目中,我正在尝试构建2个html页面,让我称之为first.html和second.html.

在first.html中,我想添加一个指向second.html的链接,这允许我导航到second.html.我试过两种方法.

  1. window.location的

    window.location = "second.html"
    
    Run Code Online (Sandbox Code Playgroud)
  2. 标签

    <a href=“second.html”></a>
    
    Run Code Online (Sandbox Code Playgroud)

结果,他们都导致错误说"发生异常消息:异常:无法重新定义属性:org".

谁能告诉我如何正确导航到新页面?

html javascript jquery cordova

12
推荐指数
1
解决办法
1万
查看次数

使用Swift实施应用内电子邮件失败

我想使用swift来实现应用内电子邮件.单击该按钮时,会弹出电子邮件窗口.但是,我无法发送电子邮件.此外,点击取消删除草稿后,我无法返回到原始屏幕.

import UIkit
import MessageUI


class Information : UIViewController, MFMailComposeViewControllerDelegate{

    var myMail: MFMailComposeViewController!

    @IBAction func sendReport(sender : AnyObject) {

        if(MFMailComposeViewController.canSendMail()){
            myMail = MFMailComposeViewController()

            //myMail.mailComposeDelegate

            // set the subject
            myMail.setSubject("My report")

            //To recipients
            var toRecipients = ["lipeilin@gatech.edu"]
            myMail.setToRecipients(toRecipients)

            //CC recipients
            var ccRecipients = ["tzhang85@gatech.edu"]
            myMail.setCcRecipients(ccRecipients)

            //CC recipients
            var bccRecipients = ["tzhang85@gatech.edu"]
            myMail.setBccRecipients(ccRecipients)

            //Add some text to the message body
            var sentfrom = "Email sent from my app"
            myMail.setMessageBody(sentfrom, isHTML: true)

            //Include an attachment
            var image = UIImage(named: "Gimme.png")
            var imageData = …
Run Code Online (Sandbox Code Playgroud)

email-attachments ios swift mfmailcomposeviewcontroller

10
推荐指数
1
解决办法
4736
查看次数

无法在Xcode 6中构建iOS应用程序

我的应用程序是用swift编写的,它在模拟器中运行得很好.但是,当我尝试为我的iPad构建它时,它说

"Cannot load underlying module for 'Foundation"
"Cannot load underlying module for 'Foundation"
"Cannot load underlying module for 'Foundation"
"Cannot load underlying module for 'Foundation"
Run Code Online (Sandbox Code Playgroud)

iPad是iOS 8,该项目针对的是iOS 8

xcode ipad ios swift

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