{"id":12213,"date":"2023-12-15T13:11:02","date_gmt":"2023-12-15T05:11:02","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=12213"},"modified":"2023-12-15T13:11:02","modified_gmt":"2023-12-15T05:11:02","slug":"%e8%8b%b9%e6%9e%9c%e5%85%8d%e7%ad%be%e6%89%93%e5%8c%85%e5%87%ba%e6%9d%a5%e8%83%8c%e6%99%af%e9%bb%91%e8%89%b2%e6%80%8e%e4%b9%88%e5%81%9a%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/12213\/","title":{"rendered":"\u82f9\u679c\u514d\u7b7e\u6253\u5305\u51fa\u6765\u80cc\u666f\u9ed1\u8272\u600e\u4e48\u505a\uff1f"},"content":{"rendered":"

\u82f9\u679c\u514d\u7b7e\u6253\u5305\u80cc\u666f\u9ed1\u8272\u95ee\u9898\u5206\u6790\u53ca\u89e3\u51b3\u65b9\u6848<\/p>\n

\u5728\u82f9\u679c\u5e94\u7528\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4e3a\u4e86\u907f\u514d\u6bcf\u6b21\u90fd\u9700\u7533\u8bf7\u5f00\u53d1\u8005\u8bc1\u4e66\uff0c\u8bb8\u591a\u5f00\u53d1\u8005\u91c7\u7528\u514d\u7b7e\u6253\u5305\u65b9\u5f0f\u3002\u4f46\u662f\uff0c\u514d\u7b7e\u6253\u5305\u51fa\u6765\u7684\u5e94\u7528\u53ef\u80fd\u51fa\u73b0\u80cc\u666f\u4e3a\u9ed1\u8272\u7684\u95ee\u9898\u3002\u672c\u6587\u5c06\u4ece\u539f\u7406\u548c\u89e3\u51b3\u65b9\u6848\u4e24\u65b9\u9762\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e00\u95ee\u9898\u3002<\/p>\n

\u4e00\u3001\u9ed1\u8272\u80cc\u666f\u539f\u7406\u5206\u6790<\/p>\n

\u82f9\u679c\u514d\u7b7e\u6253\u5305\u7684\u539f\u7406\u4e3b\u8981\u5229\u7528\u5df2<\/p>\n

<\/figure>\n<\/p>\n

\u7ecf\u4e0a\u67b6App Store\u7684\u5e94\u7528\u66ff\u6362\u8f6f\u4ef6\u5305\u5185\u7684\u53ef\u6267\u884c\u6587\u4ef6\u548c\u8d44\u6e90\u6587\u4ef6\u3002\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u6ca1\u6709\u82f9\u679c\u5b98\u65b9\u7684\u7b7e\u540d\uff0c\u4ece\u800c\u4f7f\u5e94\u7528\u5728\u8bbe\u5907\u4e0a\u6b63\u5e38\u4f7f\u7528\u3002\u4f46\u7531\u4e8e\u53ef\u80fd\u5b58\u5728\u4e0d\u540c\u5e94\u7528\u4e4b\u95f4\u7684\u73af\u5883\u5dee\u5f02\uff0c\u5728\u66ff\u6362\u8d44\u6e90\u6587\u4ef6\u540e\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u89c6\u56fe\u6e32\u67d3\u9519\u8bef\uff0c\u4ece\u800c\u5bfc\u81f4\u80cc\u666f\u663e\u793a\u9ed1\u8272\u3002<\/p>\n

\u4e8c\u3001\u89e3\u51b3\u65b9\u6848<\/p>\n

1. \u4fee\u6539Info.plist\u6587\u4ef6<\/p>\n

\u514d\u7b7e\u6253\u5305\u53ef\u80fd\u5bfc\u81f4Info.plist\u6587\u4ef6\u914d\u7f6e\u88ab\u8986\u76d6\uff0c\u4ece\u800c\u5bfc\u81f4\u539f\u6709\u7684\u767d\u8272\u80cc\u666f\u914d\u7f6e\u4e22\u5931\u3002\u89e3\u51b3\u65b9\u6848\u662f\u68c0\u67e5Info.plist\u6587\u4ef6\uff0c\u5c06UIStatusBarStyle\u548cUIViewControllerBasedStatusBarAppearance\u8fd9\u4e24\u4e2a\u5173\u952e\u503c\u8bbe\u7f6e\u6b63\u786e\u3002<\/p>\n

\u786e\u4fddInfo.plist\u7684UIStatusBarStyle\u8bbe\u7f6e\u4e3a\uff1a<\/p>\n

“`<\/p>\n

UIStatusBarStyle<\/p>\n

UIStatusBarStyleLightContent<\/p>\n

“`<\/p>\n

\u540c\u65f6\uff0c\u5c06UIViewControlleios\u514d\u7b7e\u5b89\u88c5<\/a>rBasedStatusBarAppearance\u8bbe\u7f6e\u4e3a\uff1a<\/p>\n

“`<\/p>\n

UIViewControllerBasedStatusBarAppearance<\/p>\n<\/p>\n

“`<\/p>\n

2. \u68c0\u67e5UI\u8bbe\u7f6e<\/p>\n

\u5728\u5e94\u7528\u542f\u52a8\u65f6\uff0c\u68c0\u67e5AppDelegate.swift\u6216AppDelegate.m\u4e2d\u7684\u4ee3\u7801\u662f\u5426\u6709\u5728\u542f\u52a8\u65f6\u5bf9UI\u8fdb\u884c\u8bbe\u7f6e\u3002\u5982\u679c\u53d1\u73b0\u6709\u5bf9\u7a97\u53e3\uff08window\uff09\u80cc\u666f\u989c\u8272\u7684\u4fee\u6539\uff0c\u8bf7\u5c06\u5176\u66f4\u6539\u4e3a\u6b63\u5e38\u663e\u793a\u7684\u989c\u8272\u3002\u4f8b\u5982\uff0c\u5728Swift\u4e2d\u8bbe\u7f6e\u4e3a\u767d\u8272\u80cc\u666f\uff1a<\/p>\n

“`swift<\/p>\n

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {<\/p>\n

window?.backgroundColor = UIColor.w\u82f9\u679c\u624b\u673awebclip\u65e0\u6cd5\u79fb\u9664<\/a>hite<\/p>\n

return true<\/p>\n

}<\/p>\n

“`<\/p>\n

\u540c\u6837\uff0c\u5728Objective-C\u4e2d\u8bbe\u7f6e\u4e3a\u767d\u8272\u80cc\u666f\uff1a<\/p>\n

“`objc<\/p>\n

– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {<\/p>\n

self.window.backgroundColor = [UIColor whiteColor];<\/p>\n

return YES;<\/p>\n

}<\/p>\n

“`<\/p>\n

3. \u4fee\u6539LaunchScreen\u8bbe\u7f6e<\/p>\n

\u68c0\u67e5\u9879\u76ee\u7684LaunchScreen.storyboard\u6216LaunchScreen.xib\u6587\u4ef6\uff0c\u786e\u4fdd\u6ca1\u6709\u9519\u8bef\u7684\u914d\u7f6e\u5bfc\u81f4\u542f\u52a8\u753b\u9762\u52a0\u8f7d\u4e0d\u6b63\u786e\u3002\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u91cd\u65b0\u521b\u5efa\u4e00\u4e2a\u7a7a\u767d\u7684\u542f\u52a8\u753b\u9762\uff0c\u7136\u540e\u5c06\u5176\u8bbe\u7f6e\u4e3a\u9879\u76ee\u7684\u542f\u52a8\u753b\u9762\uff0c\u4ee5\u6392\u9664\u8fd9\u79cd\u53ef\u80fd\u6027\u3002<\/p>\n

4. \u66ff\u6362\u6b63\u786e\u7684\u80cc\u666f\u8d44\u6e90<\/p>\n

\u5728\u5207\u6362\u514d\u7b7e\u6253\u5305\u7684\u5e94\u7528\u8d44\u6e90\u65f6\uff0c\u8bf7\u786e\u4fdd\u63d0\u4f9b\u4e86\u6b63\u786e\u7684\u80cc\u666f\u56fe\u7247\u548c\u5176\u4ed6\u8d44\u6e90\u6587\u4ef6\uff0c\u907f\u514d\u4e0d\u540c\u5e94\u7528\u95f4\u7684\u8d44\u6e90\u66ff\u6362\u5bfc\u81f4\u663e\u793a\u95ee\u9898\u3002<\/p>\n

\u603b\u7ed3\uff1a<\/p>\n

\u82f9\u679c\u514d\u7b7e\u6253\u5305\u80cc\u666f\u9ed1\u8272\u95ee\u9898\u53ef\u80fd\u6d89\u53ca\u591a\u4e2a\u65b9\u9762\uff0c\u5982Info.plist\u914d\u7f6e\u3001UI\u8bbe\u7f6e\u3001LaunchScreen\u53ca\u8d44\u6e90\u6587\u4ef6\u7684\u66ff\u6362\u3002\u5f00\u53d1\u8005\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u6392\u67e5\u5e76\u89e3\u51b3\u95ee\u9898\uff0c\u786e\u4fdd\u5e94\u7528\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u82f9\u679c\u514d\u7b7e\u6253\u5305\u80cc\u666f\u9ed1\u8272\u95ee\u9898\u5206\u6790\u53ca\u89e3\u51b3\u65b9\u6848\u5728\u82f9\u679c\u5e94\u7528\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4e3a\u4e86\u907f\u514d\u6bcf\u6b21\u90fd\u9700\u7533\u8bf7\u5f00\u53d1\u8005\u8bc1\u4e66\uff0c\u8bb8\u591a\u5f00\u53d1\u8005\u91c7\u7528\u514d\u7b7e\u6253\u5305\u65b9\u5f0f\u3002\u4f46\u662f\uff0c\u514d\u7b7e\u6253\u5305\u51fa\u6765\u7684\u5e94\u7528\u53ef\u80fd\u51fa\u73b0\u80cc\u666f\u4e3a\u9ed1\u8272\u7684\u95ee\u9898\u3002\u672c\u6587\u5c06\u4ece\u539f\u7406\u548c\u89e3\u51b3\u65b9\u6848\u4e24\u65b9\u9762<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[9738,16,6568,13260,4202],"topic":[],"class_list":["post-12213","post","type-post","status-publish","format-standard","hentry","category-iosmq","tag-webclip","tag-16","tag-6568","tag-13260","tag-4202"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/12213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=12213"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/12213\/revisions"}],"predecessor-version":[{"id":12246,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/12213\/revisions\/12246"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=12213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=12213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=12213"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=12213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}