{"id":580,"date":"2023-02-25T19:34:12","date_gmt":"2023-02-25T11:34:12","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=580"},"modified":"2023-04-29T20:32:06","modified_gmt":"2023-04-29T12:32:06","slug":"swift-ui-progress-bar-uiprogressview","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/25\/swift-ui-progress-bar-uiprogressview\/","title":{"rendered":"Swift UI &#8211; \u8fdb\u5ea6\u6761\uff08UIProgressView\uff09"},"content":{"rendered":"<blockquote>\n<p>\u6ce8\uff1a\u4ee3\u7801\u5df2\u5347\u7ea7\u81f3Swift4<\/p>\n<\/blockquote>\n<h3>\u521b\u5efa\u8fdb\u5ea6\u6761<\/h3>\n<p><!-- more --><\/p>\n<pre><code class=\"language-swift\">let progressView = UIProgressView(progressViewStyle: .default)\nprogressView.center = self.view.center\nprogressView.progress = 0.5  \/\/\u9ed8\u8ba4\u8fdb\u5ea650%\nself.view.addSubview(progressView)<\/code><\/pre>\n<h3>\u8bbe\u7f6e\u8fdb\u5ea6\uff0c\u540c\u65f6\u6709\u52a8\u753b\u6548\u679c<\/h3>\n<pre><code class=\"language-swift\">progressView.setProgress(0.8, animated:true)<\/code><\/pre>\n<h3>\u6539\u53d8\u8fdb\u5ea6\u6761\u989c\u8272<\/h3>\n<pre><code class=\"language-swift\">progressView.progressTintColor = UIColor.green  \/\/\u5df2\u6709\u8fdb\u5ea6\u989c\u8272\nprogressView.trackTintColor = UIColor.blue  \/\/\u5269\u4f59\u8fdb\u5ea6\u989c\u8272\uff08\u5373\u8fdb\u5ea6\u69fd\u989c\u8272\uff09<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\uff1a\u4ee3\u7801\u5df2\u5347\u7ea7\u81f3Swift4 \u521b\u5efa\u8fdb\u5ea6\u6761 let progressView = UIProgressView( [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[171],"tags":[],"class_list":["post-580","post","type-post","status-publish","format-standard","hentry","category-swift"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}