{"id":443432,"date":"2024-12-26T08:37:48","date_gmt":"2024-12-26T08:37:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=443432"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=443432","title":{"rendered":"<span>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0441 UIKit \u043d\u0430 SwiftUI. \u0427\u0430\u0441\u0442\u044c 3. ProgressView vs SkeletonView<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u044d\u043f\u043e\u043f\u0435\u044e \u0441 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u044d\u043a\u0440\u0430\u043d\u0430\u043c\u0438 \u043d\u0430 SwiftUI. \u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/848972\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0443\u0436\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0438\u043d\u0442\u0440\u0438\u0433\u0443, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430. \u0411\u044b\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430, \u0441\u0434\u0435\u043b\u0430\u0442\u044c ProgressView \u0438 SkeletonView. \u0412\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e.<\/p>\n<p>ProgressView \u043f\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0443 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b\u0442\u044c \u0441 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u043a\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0442\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u043e\u0441\u043e\u0447\u043a\u0443 &#8212; \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0435\u0439 \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 ProgressView, \u0443 \u043d\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u043a\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 &#8212; \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u0430\u044f View.<\/p>\n<p>\u0425\u043e\u0442\u044f, \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e \u043f\u0440\u0430\u0432\u0434\u0435, \u044f \u0434\u0430\u0436\u0435 \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 ProgressView \u0432 \u0438\u0442\u043e\u0433\u0435 \u0443\u0434\u0430\u043b\u0438\u043b\u0430, \u0442 \u043a \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u043b\u043e\u0432, \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c4c\/85d\/f85\/c4c85df85be385d66c4cb2341a6f884f.gif\" alt=\"\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 - \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c\" title=\"\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 - \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c\" width=\"800\" height=\"1739\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c4c\/85d\/f85\/c4c85df85be385d66c4cb2341a6f884f.gif\"\/><\/p>\n<div><figcaption>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 &#8212; \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"swift\">struct GenerateReportView: View {        @Environment(\\.presentationMode) var presentationMode          @State private var progress: Float = 0.0     @State private var progressIncrement: Float = 0.05     @State private var displayLink: Timer? = nil     @State private var text = \"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430...\"          var body: some View {         VStack {             Spacer()             VStack {                 Image(\"reviewIcon\")                                      ZStack(alignment: .leading) {                     \/\/ \u0424\u0435\u0439\u043a\u043e\u0432\u044b\u0439 \u0444\u043e\u043d ProgressView                     RoundedRectangle(cornerRadius: 16)                                          \/\/ \u0424\u0435\u0439\u043a\u043e\u0432\u0430\u044f \u043f\u043e\u043b\u043e\u0441\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u043b\u044f ProgressView \u0441 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c                     RoundedRectangle(cornerRadius: 16)                         .fill(LinearGradient(gradient:                               Gradient(colors: [Color(UIColor(hex: \"#5C4EF2\")),                                                 Color(UIColor(hex: \"#1A96FF\"))]),                               startPoint: .leading,                               endPoint: .trailing))                 }                                  Text(text)                     ...             }         }     } } <\/code><\/pre>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442: \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u0432\u0430 <code>RoundedRectangle()<\/code> \u0432\u044b\u0441\u043e\u0442\u043e\u0439 8 \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0432 <code>ZStack<\/code>. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u043c\u0443 <code>LinearGradient<\/code> \u0438 \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u0432\u0441\u0451. \u0421\u0434\u0435\u043b\u0430\u043b\u0430 \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0439 \u0442\u0430\u0439\u043c\u0435\u0440 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430, \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 \u0438\u0437 API. \u041f\u043e \u043c\u0435\u0440\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u043f\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<pre><code class=\"swift\">\/\/ Function to start fake progress     private func startFakeProgress() {         displayLink = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in             if self.progress &lt; 0.99 {                 self.progress = min(self.progress + self.progressIncrement, 0.99)                 self.updateText()                 self.adjustProgressIncrement()             } else {                 self.completeProgress()             }         }     }          \/\/ Function to update text based on progress     private func updateText() {         switch progress {         case 0.0...0.19:             text = \"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430...\"         case 0.2...0.498:             text = \"\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430...\"         case 0.5...0.598:             text = \"\u041d\u0443\u0436\u043d\u043e \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438...\"         case 0.599...0.698:             text = \"\u0421\u043a\u043e\u0440\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f...\"         case 0.699...0.89:             text = \"\u0415\u0449\u0451 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c...\"         case 0.899...0.999:             text = \"\u0423\u0436\u0435 \u043f\u043e\u0447\u0442\u0438...\"         default:             text = \"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430...\"         }     }          \/\/ Function to adjust progress increment as it gets closer to completion     private func adjustProgressIncrement() {         switch progress {         case 0.0...0.19:             progressIncrement \/= 1.0         case 0.2...0.89:             progressIncrement \/= 1.1         case 0.9...0.99:             progressIncrement \/= 1.12         default:             break         }     }          \/\/ Function to complete progress quickly once the server responds     private func completeProgress() {         displayLink?.invalidate()         displayLink = nil                  \/\/ Complete the progress in 1 second         withAnimation(.linear(duration: 1.0)) {             progress = 1.0         }                  \/\/ Call the delegate function if needed         \/\/ delegate?.progressDone()     }          \/\/ Call this function when you receive the server response     func serverResponseReceived() {         completeProgress()     }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a SkeletonView.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c3\/8c6\/d8d\/7c38c6d8dc271c7548a2178248d8c867.gif\" width=\"800\" height=\"1739\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7c3\/8c6\/d8d\/7c38c6d8dc271c7548a2178248d8c867.gif\"\/><\/figure>\n<p>\u0415\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0433\u0435\u043c\u043e\u0440\u0440\u043e\u0439\u043d\u0435\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u043e\u0431\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>SkeletonLoadingView<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0444\u043e\u0440\u043c\u0443, \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0446\u0432\u0435\u0442. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u0438\u0445 View.<\/p>\n<pre><code class=\"swift\">struct SkeletonLoadingView&lt;ShapeType: Shape&gt;: View {          @State private var animationPosition: CGFloat = -1     var width: CGFloat = 100     var height: CGFloat = 10          let shape: ShapeType     let animation: Animation     let gradient: Gradient          var body: some View {         shape             .fill(self.gradientFill())             .frame(width: width, height: height)             .onAppear {                 withAnimation(animation) {                     animationPosition = 2                 }             }     }          private func gradientFill() -&gt; LinearGradient {         return LinearGradient(gradient: gradient,                               startPoint: .init(x: animationPosition - 1, y: animationPosition - 1),                               endPoint: .init(x: animationPosition + 1, y: animationPosition + 1))     } } <\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c 4 \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u043d\u0430 \u043c\u043e\u0439 \u044d\u043a\u0440\u0430\u043d, \u044f \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"swift\">VStack(alignment: .leading, spacing: 8) {                     SkeletonLoadingView(width: 350,                                         shape: RoundedRectangle(cornerRadius: 8),                                         animation: .easeIn(duration: 1).repeatForever(autoreverses: true),                                         gradient: Gradient(colors: [Color.blue, Color.white]))                     SkeletonLoadingView(width: 380,                                         shape: RoundedRectangle(cornerRadius: 8),                                         animation: .easeIn(duration: 1).repeatForever(autoreverses: true),                                         gradient: Gradient(colors: [Color.blue, Color.white]))                     SkeletonLoadingView(width: 350,                                         shape: RoundedRectangle(cornerRadius: 8),                                         animation: .easeIn(duration: 1).repeatForever(autoreverses: true),                                         gradient: Gradient(colors: [Color.blue, Color.white]))                     SkeletonLoadingView(width: 180,                                         shape: RoundedRectangle(cornerRadius: 8),                                         animation: .easeIn(duration: 1).repeatForever(autoreverses: true),                                         gradient: Gradient(colors: [Color.blue, Color.white])) }<\/code><\/pre>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0442\u043e\u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u043e \u0432\u043e\u0442 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u044f \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c View \u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0442\u0443\u0442-\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0437\u0430\u043a\u0440\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u044f&#8230; \u0412\u043e\u0442 \u043c\u044b \u0438 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0438\u043d\u0442\u0440\u0438\u0433\u0435 &#8212; \u0430, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043c <code>SkeletonView<\/code>, \u0435\u0441\u043b\u0438 \u044f \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0430 <code>ProgressView<\/code>?<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/b3e\/247\/9bf\/b3e2479bfe94e9f9b69287ddafef683f.jpg\" alt=\"\u0412 \u0441\u043c\u044b\u0441\u043b\u0435, \u0430 \u044f \u0443\u0436\u0435 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043b\u0430!\" title=\"\u0412 \u0441\u043c\u044b\u0441\u043b\u0435, \u0430 \u044f \u0443\u0436\u0435 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043b\u0430!\" width=\"861\" height=\"484\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b3e\/247\/9bf\/b3e2479bfe94e9f9b69287ddafef683f.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0412 \u0441\u043c\u044b\u0441\u043b\u0435, \u0430 \u044f \u0443\u0436\u0435 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043b\u0430!<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u043a\u0430\u0437\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438 &#8212; \u043e\u043d\u0438 \u0443\u0436\u0435 \u0432\u0441\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0438 Skeleton \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0432\u044b\u0437\u043e\u0432\u0435\u0442\u0441\u044f. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c <code>ProgressView<\/code>. \u0422\u043e \u0435\u0441\u0442\u044c <code>SkeletonView<\/code> \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u041d\u0443, \u0431\u044b\u0432\u0430\u0435\u0442&#8230;<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0430 \u043c\u043e\u0451\u043c <a href=\"https:\/\/github.com\/kosyakus\/ModalViewExampleApp\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430 \u0442\u0430\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Skeleton &#8212; <code>BreathingSkeletonText<\/code>. \u0422\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 RoundedRectangle (\u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0439), \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0446\u0432\u0435\u0442\u0430 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u041f\u043e\u0434\u043e\u0439\u0434\u0451\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0438 \u0446\u0432\u0435\u0442\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f Skeleton.<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043a\u0430\u043a\u0438\u0435 \u0432\u0430\u043c \u0435\u0449\u0451 \u0442\u0435\u043c\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b? \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0432\u0441\u044f\u043a\u0438\u0435 \u043c\u0438\u043d\u0438 \u0432\u0438\u0434\u0435\u043e \u043f\u043e 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0433\u0434\u0435 \u044f \u0434\u0435\u043b\u0430\u044e \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0448\u0442\u0443\u043a\u0438 \u043d\u0430 SwiftUI \u0447\u0438\u0441\u0442\u043e \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438. \u041c\u043e\u0433\u0443 \u0442\u0430\u043a \u0436\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u044e\u0434\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u0434.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u043f\u043e\u0441\u0442 \u0432 \u0422\u0413 \u0433\u0434\u0435 \u044f <a href=\"https:\/\/t.me\/NataWakeUp\/504\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u043b\u0430\u044e \u0441\u043d\u0435\u0436\u0438\u043d\u043a\u0438<\/a> \u0438\u043b\u0438 \u0432\u043e\u0442 \u0441\u043e\u0437\u0434\u0430\u044e <a href=\"https:\/\/t.me\/NataWakeUp\/478\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0433\u0440\u0443<\/a> &#171;\u043a\u043e\u0448\u043a\u0438-\u043c\u044b\u0448\u043a\u0438&#187;.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/853600\/\"> https:\/\/habr.com\/ru\/articles\/853600\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u044d\u043f\u043e\u043f\u0435\u044e \u0441 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u044d\u043a\u0440\u0430\u043d\u0430\u043c\u0438 \u043d\u0430 SwiftUI. \u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/848972\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0443\u0436\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0438\u043d\u0442\u0440\u0438\u0433\u0443, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430. \u0411\u044b\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430, \u0441\u0434\u0435\u043b\u0430\u0442\u044c ProgressView \u0438 SkeletonView. \u0412\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e.<\/p>\n<p>ProgressView \u043f\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0443 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b\u0442\u044c \u0441 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u043a\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0442\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u043e\u0441\u043e\u0447\u043a\u0443 &#8212; \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0435\u0439 \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 ProgressView, \u0443 \u043d\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u043a\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 &#8212; \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u0430\u044f View.<\/p>\n<p>\u0425\u043e\u0442\u044f, \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e \u043f\u0440\u0430\u0432\u0434\u0435, \u044f \u0434\u0430\u0436\u0435 \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 ProgressView \u0432 \u0438\u0442\u043e\u0433\u0435 \u0443\u0434\u0430\u043b\u0438\u043b\u0430, \u0442 \u043a \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u043b\u043e\u0432, \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430!<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 &#8212; \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"swift\">struct GenerateReportView: View {        @Environment(\\.presentationMode) var presentationMode          @State private var progress: Float = 0.0     @State private var progressIncrement: Float = 0.05     @State private var displayLink: Timer? = nil     @State private var text = \"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430...\"          var body: some View {         VStack {             Spacer()             VStack {                 Image(\"reviewIcon\")                                      ZStack(alignment: .leading) {                     \/\/ \u0424\u0435\u0439\u043a\u043e\u0432\u044b\u0439 \u0444\u043e\u043d ProgressView                     RoundedRectangle(cornerRadius: 16)                                          \/\/ \u0424\u0435\u0439\u043a\u043e\u0432\u0430\u044f \u043f\u043e\u043b\u043e\u0441\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u043b\u044f ProgressView \u0441 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c                     RoundedRectangle(cornerRadius: 16)                         .fill(LinearGradient(gradient:                               Gradient(colors: [Color(UIColor(hex: \"#5C4EF2\")),                                                 Color(UIColor(hex: \"#1A96FF\"))]),                               startPoint: .leading,                               endPoint: .trailing))                 }                                  Text(text)                     ...             }         }     } } <\/code><\/pre>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442: \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u0432\u0430 <code>RoundedRectangle()<\/code> \u0432\u044b\u0441\u043e\u0442\u043e\u0439 8 \u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0432 <code>ZStack<\/code>. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u043c\u0443 <code>LinearGradient<\/code> \u0438 \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e \u0432\u0441\u0451. \u0421\u0434\u0435\u043b\u0430\u043b\u0430 \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0439 \u0442\u0430\u0439\u043c\u0435\u0440 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430, \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430 \u0438\u0437 API. \u041f\u043e \u043c\u0435\u0440\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0434\u043f\u0438\u0441\u044c \u043f\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u043e\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<pre><code class=\"swift\">\/\/ Function to start fake progress     private func startFakeProgress() {         displayLink = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in             if self.progress &lt; 0.99 {                 self.progress = min(self.progress + self.progressIncrement, 0.99)                 self.updateText()                 self.adjustProgressIncrement()             } else {                 self.completeProgress()             }         }     }          \/\/ Function to update text based on progress     private func updateText() {         switch progress {         case 0.0...0.19:             text = \"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430...\"         case 0.2...0.498:             text = \"\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430...\"         case 0.5...0.598:             text = \"\u041d\u0443\u0436\u043d\u043e \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438...\"         case 0.599...0.698:             text = \"\u0421\u043a\u043e\u0440\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f...\"         case 0.699...0.89:             text = \"\u0415\u0449\u0451 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c...\"         case 0.899...0.999:             text = \"\u0423\u0436\u0435 \u043f\u043e\u0447\u0442\u0438...\"         default:             text = \"\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430...\"         }     }          \/\/ Function to adjust progress increment as it gets closer to completion     private func adjustProgressIncrement() {         switch progress {         case 0.0...0.19:             progressIncrement \/= 1.0         case 0.2...0.89:             progressIncrement \/= 1.1         case 0.9...0.99:             progressIncrement \/= 1.12         default:             break         }     }          \/\/ Function to complete progress quickly once the server responds     private func completeProgress() {         displayLink?.invalidate()         displayLink = nil                  \/\/ Complete the progress in 1 second         withAnimation(.linear(duration: 1.0)) {             progress = 1.0         }                  \/\/ Call the delegate function if needed         \/\/ delegate?.progressDone()     }          \/\/ Call this function when you receive the server response     func serverResponseReceived() {         completeProgress()     }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a SkeletonView.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0415\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0433\u0435\u043c\u043e\u0440\u0440\u043e\u0439\u043d\u0435\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u043e\u0431\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code>SkeletonLoadingView<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0444\u043e\u0440\u043c\u0443, \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0446\u0432\u0435\u0442. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u0438\u0445 View.<\/p>\n<pre><code class=\"swift\">struct SkeletonLoadingView&lt;ShapeType: Shape&gt;: View {          @State private var animationPosition: CGFloat = -1     var width: CGFloat = 100     var height: CGFloat = 10          let shape: ShapeType     let animation: Animation     let gradient: Gradient          var body: some View {         shape             .fill(self.gradientFill())             .frame(width: width, height: height)             .onAppear {                 withAnimation(animation) {                     animationPosition = 2                 }             }     }          private func gradientFill() -&gt; LinearGradient {         return LinearGradient(gradient: gradient,                               startPoint: .init(x: animationPosition - 1, y: animationPosition - 1),                               endPoint: .init(x: animationPosition + 1, y: animationPosition + 1))     } } <\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c 4 \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u043d\u0430 \u043c\u043e\u0439 \u044d\u043a\u0440\u0430\u043d, \u044f \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"swift\">VStack(alignment: .leading, spacing: 8) {                     SkeletonLoadingView(width: 350,                                         shape: RoundedRectangle(cornerRadius: 8),                                         animation: .easeIn(duration: 1).repeatForever(autoreverses: true),                                         gradient: Gradient(colors: [Color.blue, Color.white]))                     SkeletonLoadingView(width: 380,                                         shape: RoundedRectangle(cornerRadius: 8),                                         animation: .easeIn(duration: 1).repeatForever(autoreverses: true),                                         gradient: Gradient(colors: [Color.blue, Color.white]))                     SkeletonLoadingView(width: 350,                                         shape: RoundedRectangle(cornerRadius: 8),                                         animation: .easeIn(duration: 1).repeatForever(autoreverses: true),                                         gradient: Gradient(colors: [Color.blue, Color.white]))                     SkeletonLoadingView(width: 180,                                         shape: RoundedRectangle(cornerRadius: 8),                                         animation: .easeIn(duration: 1).repeatForever(autoreverses: true),                                         gradient: Gradient(colors: [Color.blue, Color.white])) }<\/code><\/pre>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0442\u043e\u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u043e \u0432\u043e\u0442 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u044f \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0442\u044c View \u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0442\u0443\u0442-\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0437\u0430\u043a\u0440\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u044f&#8230; \u0412\u043e\u0442 \u043c\u044b \u0438 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0438\u043d\u0442\u0440\u0438\u0433\u0435 &#8212; \u0430, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043c <code>SkeletonView<\/code>, \u0435\u0441\u043b\u0438 \u044f \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0430 <code>ProgressView<\/code>?<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412 \u0441\u043c\u044b\u0441\u043b\u0435, \u0430 \u044f \u0443\u0436\u0435 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043b\u0430!<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u043a\u0430\u0437\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438 &#8212; \u043e\u043d\u0438 \u0443\u0436\u0435 \u0432\u0441\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0438 Skeleton \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0432\u044b\u0437\u043e\u0432\u0435\u0442\u0441\u044f. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c <code>ProgressView<\/code>. \u0422\u043e \u0435\u0441\u0442\u044c <code>SkeletonView<\/code> \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u041d\u0443, \u0431\u044b\u0432\u0430\u0435\u0442&#8230;<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043d\u0430 \u043c\u043e\u0451\u043c <a href=\"https:\/\/github.com\/kosyakus\/ModalViewExampleApp\" rel=\"noopener noreferrer nofollow\">GitHub<\/a>.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430 \u0442\u0430\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Skeleton &#8212; <code>BreathingSkeletonText<\/code>. \u0422\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 RoundedRectangle (\u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0439), \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0446\u0432\u0435\u0442\u0430 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u041f\u043e\u0434\u043e\u0439\u0434\u0451\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0438 \u0446\u0432\u0435\u0442\u0430 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f Skeleton.<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043a\u0430\u043a\u0438\u0435 \u0432\u0430\u043c \u0435\u0449\u0451 \u0442\u0435\u043c\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b? \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0432\u0441\u044f\u043a\u0438\u0435 \u043c\u0438\u043d\u0438 \u0432\u0438\u0434\u0435\u043e \u043f\u043e 10 \u0441\u0435\u043a\u0443\u043d\u0434 \u0433\u0434\u0435 \u044f \u0434\u0435\u043b\u0430\u044e \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0448\u0442\u0443\u043a\u0438 \u043d\u0430 SwiftUI \u0447\u0438\u0441\u0442\u043e \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438. \u041c\u043e\u0433\u0443 \u0442\u0430\u043a \u0436\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u044e\u0434\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u0434.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u043f\u043e\u0441\u0442 \u0432 \u0422\u0413 \u0433\u0434\u0435 \u044f <a href=\"https:\/\/t.me\/NataWakeUp\/504\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u043b\u0430\u044e \u0441\u043d\u0435\u0436\u0438\u043d\u043a\u0438<\/a> \u0438\u043b\u0438 \u0432\u043e\u0442 \u0441\u043e\u0437\u0434\u0430\u044e <a href=\"https:\/\/t.me\/NataWakeUp\/478\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0433\u0440\u0443<\/a> &#171;\u043a\u043e\u0448\u043a\u0438-\u043c\u044b\u0448\u043a\u0438&#187;.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/853600\/\"> https:\/\/habr.com\/ru\/articles\/853600\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-443432","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/443432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=443432"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/443432\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=443432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=443432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=443432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}