离子载玻片未加载

时间:2018-08-01 06:54:21

标签: angular ionic-framework

最初没有将离子载玻片装入dom

let alertController = UIAlertController(title: "OD Authorise", message: "", preferredStyle: UIAlertControllerStyle.alert)

    let AUTHORISE = UIAlertAction(title: "AUTHORISE", style: UIAlertActionStyle.default, handler: {
        alert -> Void in

        let firstTextField = alertController.textFields![4] as UITextField
        if firstTextField.text?.count == 0
        {
            //print("Please enter your remark first")
            SVProgressHUD.showError(withStatus: "Please enter your remark first")
            self.present(alertController, animated: true, completion: nil)

            return
        }
        print("<><><><><><>",firstTextField.text ?? "")

    })

    let DENY = UIAlertAction(title: "DENY", style: UIAlertActionStyle.default, handler: {
        (action : UIAlertAction!) -> Void in

    })

    let CANCEL = UIAlertAction(title: "CANCEL", style: UIAlertActionStyle.default, handler: {
        (action : UIAlertAction!) -> Void in

    })


    alertController.addTextField { (txtRemarks : UITextField!) -> Void in
        txtRemarks.font = UIFont(name: (txtRemarks.font?.fontName)!, size: 11)
        txtRemarks.text = " Employee Name : YOUR ARRAY OBJECT"//\(self.empNameArr[indexPath.row]) "
        txtRemarks.isUserInteractionEnabled=false
        txtRemarks.borderStyle = UITextBorderStyle.none

    }

    alertController.addTextField { (txtRemarks : UITextField!) -> Void in
        txtRemarks.font = UIFont(name: (txtRemarks.font?.fontName)!, size: 11)
        txtRemarks.text = " From Date : YOUR ARRAY OBJECT"//\(self.leavDateArr[indexPath.row]) "
        txtRemarks.isUserInteractionEnabled=false
        txtRemarks.borderStyle = UITextBorderStyle.none

    }
    alertController.addTextField { (txtRemarks : UITextField!) -> Void in
        txtRemarks.font = UIFont(name: (txtRemarks.font?.fontName)!, size: 11)
        txtRemarks.text = " To Date : YOUR ARRAY OBJECT"//\(self.ToDate[indexPath.row]) "
        txtRemarks.isUserInteractionEnabled=false
        txtRemarks.borderStyle = UITextBorderStyle.none

    }



    alertController.addTextField { (txtRemarks : UITextField!) -> Void in
        txtRemarks.font = UIFont(name: (txtRemarks.font?.fontName)!, size: 11)
        txtRemarks.text = " Leave reason : YOUR ARRAY OBJECT"//\(self.Reason[indexPath.row]) "
        txtRemarks.isUserInteractionEnabled=false
        txtRemarks.borderStyle = UITextBorderStyle.none

    }


    alertController.addTextField { (txtRemarks : UITextField!) -> Void in
        txtRemarks.placeholder = "Enter Your Remarks"
        txtRemarks.font = UIFont(name: (txtRemarks.font?.fontName)!, size: 15)
        txtRemarks.isUserInteractionEnabled=true
        txtRemarks.borderStyle = UITextBorderStyle.line
        txtRemarks.textAlignment = NSTextAlignment.center

    }


    alertController.addAction(AUTHORISE)
    alertController.addAction(DENY)
    alertController.addAction(CANCEL)

    self.present(alertController, animated: true, completion: nil)

和我的构造函数编码

    <ion-slide *ngFor="let page of pages">
        <media-item *ngFor="let section of page.sections" [media]="section" [requiresDeleteAlert]="false"></media-item>
        <ion-row style="height: 130px;"></ion-row>
    </ion-slide>
</ion-slides>

0 个答案:

没有答案