唉,(叹气) 这些东西明明就不难,偏偏不知道要如何使用
想作成 像图片中的 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()
已解決 感謝