如何在iOS上显示视图?

时间:2015-08-04 20:43:18

标签: ios swift uiview uiviewcontroller

我无法获得实际显示的视图。我声明了CKCalenderView类型的变量(从故事板链接)。然后我尝试在应用程序加载后显示它。但是,我仍然卡在闪屏上。我是Swift和iOS的新手,所以我可能错过了一些明显的东西,但任何帮助都会受到赞赏!

   import UIKit

class ViewController: UIViewController, CKCalendarViewDelegate {

@IBOutlet weak var mainCalendar: CKCalendarView!


override func viewDidLoad() {
    super.viewDidLoad()
    mainCalendar.delegate = self;
    mainCalendar.hidden = false;
    mainCalendar.bringSubviewToFront(mainCalendar);
    //self.view.addSubview(mainCalendar);

    // Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}
}

0 个答案:

没有答案