小编Ara*_*shi的帖子

更改导航控制器颜色迅速

我想将导航栏色调控制器颜色更改为颜色:R:73,G:155,B:255,A:0.7

直到现在,我只能将其更改为系统中的颜色.以下是代表中的示例:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {

    UINavigationBar.appearance().barTintColor = UIColor.blueColor()
    UINavigationBar.appearance().tintColor = UIColor.whiteColor()

    return true
}
Run Code Online (Sandbox Code Playgroud)

此外,我希望能够将导航视图控制器标题颜色更改为白色!

如果可能,我想将标签栏色调颜色更改为R:73,G:155,B:255,A:0.7并将其文本更改为白色.

uinavigationbar ios swift

6
推荐指数
1
解决办法
4130
查看次数

Swift中Web视图的活动选择器

我正在尝试在加载Web视图时加载活动选择器,但是当Web视图加载时它会消失.

我试过这样做:

class FirstAid: UIViewController {

@IBOutlet var FirstAid: UIWebView!
@IBOutlet var activity: UIActivityIndicatorView!


func loadFirstAid(){
    let requestFirstAidURL = NSURL (string: "http://www.nhs.uk/Conditions/Accidents-and-first-aid/Pages/Introduction.aspx")
    let requestFirstAid = NSURLRequest(URL: requestFirstAidURL!)
    FirstAid.loadRequest(requestFirstAid)
}
override func viewDidLoad() {
    super.viewDidLoad()

    loadFirstAid()
}

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


func startAnimating(_ : UIWebView!){
    activity.startAnimating()
    activity.hidesWhenStopped = true

}

func stopAnimating(_ : UIWebView!){
    activity.stopAnimating()
    activity.hidesWhenStopped = true

}
Run Code Online (Sandbox Code Playgroud)

我已打开指示灯AnimatingHide while stop复选框,因此当屏幕加载指示器时,它会旋转,但在屏幕加载时不会消失.我还将Web View连接到First Aid delegate屏幕. …

animation uiwebview uiactivityindicatorview ios swift

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