swift2 - 如何设定 UIView在UIActivityIndiction之后

唉,(叹气) 这些东西明明就不难,偏偏不知道要如何使用

图片描述

想作成 像图片中的 loading ,我作了一个UIView ,也有把AcititieyIndication 都设在萤幕中间了

但,UIVIEW 就是会盖到 activityIndicator ,怎么把 UIView的图层移到 loading 后面

(唉,好多问题,自学果然是有难度的)

    let screenSize: CGRect = UIScreen.mainScreen().bounds
    let screenWidth = screenSize.width
    let screenHeight = screenSize.height
    let viewWidth:CGFloat=100;
    let viewHeight:CGFloat=100;
    let viewX:CGFloat=screenWidth / 2 - viewWidth / 2
    let viewY:CGFloat=screenHeight / 2 - viewHeight / 2
    swiftView.frame = CGRectMake(viewX, viewY, viewWidth, viewHeight)
    
   
    activityIndicator.startAnimating()
    swiftView.backgroundColor=UIColor.redColor()
    
    self.view.addSubview(swiftView)
    activityIndicator.color = UIColor.purpleColor()
阅读 2.4k
1 个回答

已解決 感謝

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进