{"id":257378,"date":"2015-05-18T11:39:02","date_gmt":"2015-05-18T07:39:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=257378"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=257378","title":{"rendered":"\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 CoreAnimation: \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f"},"content":{"rendered":"<p>       \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 <a href=\"https:\/\/medium.com\/@uxdesignagency\/the-way-digital-banking-should-work-1d278efa96a6\">\u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043e\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0431\u0430\u043d\u043a\u0430, \u043d\u043e \u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u043c\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f\u043c\u0438. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0435\u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0445 \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u043a\u043e\u043d\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u043a\u0430\u0440\u0442\u043e\u0439. <a name=\"habracut\"><\/a>\u0412\u043e\u0442 \u0442\u0443\u0442.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/50e\/071\/90c\/50e07190ceb94f6ebedc3f6d0f8ef67f.gif\" \/><\/div>\n<p>  \u041a\u043e\u0440\u043e\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u043e\u0442, \u0447\u0435\u0433\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f (\u0432 \u0441\u043b\u043e\u0443-\u043c\u043e!).<\/p>\n<p>  <img loading=\"lazy\" decoding=\"async\" src=\"\/\/habrastorage.org\/files\/f4f\/608\/063\/f4f608063ae144ac833f80bf784adf5e.gif\" align=\"left\" height=\"200\" width=\"200\"\/> \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0447\u0430\u0441\u0442\u0435\u0439: \u043f\u0440\u043e\u0440\u0438\u0441\u043e\u0432\u043a\u0430 \u043e\u0431\u0440\u0430\u043c\u043b\u044f\u044e\u0449\u0435\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0430\u043c\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0435\u0433\u043e \u0432\u0438\u0434\u0438\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0430\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0448\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044d\u0442\u0438 \u0434\u0432\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0435 \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e: \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u0442\u0430, \u0447\u0442\u043e \u0441 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u043c\u0430\u0441\u043a\u0438, \u0436\u0434\u0451\u0442, \u043f\u043e\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443, \u0438 \u043b\u0438\u0448\u044c \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u0439: \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 Xcode, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043e\u043d \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0438 \u0432\u044b \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0435\u0433\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043d\u0438\u0436\u0435, \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0443\u0434\u0430 \u0432\u044b \u0435\u0433\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435: \u0432 UIViewController \u0438\u043b\u0438 UIView, \u0442\u0430\u043a \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e\u0433\u043e, \u0433\u0434\u0435 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f\u043c\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u2014 \u044d\u0442\u043e \u0434\u0432\u0430  @property:<\/p>\n<pre><code>@property (nonatomic, weak) IBOutlet UIView *viewToDrawOn; @property (nonatomic, weak) IBOutlet UIView *imageToReveal; <\/code><\/pre>\n<p>  <img loading=\"lazy\" decoding=\"async\" src=\"\/\/habrastorage.org\/files\/b66\/321\/48a\/b6632148a70f4b59a4488bbfda1278d0.png\" align=\"left\" height=\"250\" width=\"250\"\/>\u2026 \u0433\u0434\u0435 imageToReveal \u2014 \u044d\u0442\u043e \u043f\u043e\u0434\u0432\u044c\u044e (subview) viewToDrawOn. \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u043c, \u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e viewToDrawOn \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 UIView, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c, \u0430 imageToReveal \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 UIView (\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 UIImageView), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u043a\u043e\u0439. \u0422\u0443\u0442 \u043e\u043d\u0438 \u043e\u0431\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c IBOutlet, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u043f\u0430\u0440\u0435\u043d\u044c \u043b\u0435\u043d\u0438\u0432\u044b\u0439 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0443 \u0432\u0430\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u2014 \u044f \u0438\u0445 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 storyboard \u043f\u0440\u044f\u043c\u043e \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 Interface Builder. \u041f\u043e \u044d\u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u043d\u0438 \u043e\u0431\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u043a\u0430\u043a weak \u2014 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u00ab\u0441\u0438\u043b\u044c\u043d\u044b\u0445\u00bb (strong) \u0441\u0441\u044b\u043b\u043a\u0430\u0445 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b UIView, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u0432\u044b\u0448\u0435\u0441\u0442\u043e\u044f\u0449\u0438\u0445 UIView, \u0447\u0442\u043e \u0443\u0436\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b. \u0415\u0441\u043b\u0438 \u043c\u043e\u0438\u0445 \u0441\u043b\u043e\u0432 \u043e \u0442\u043e\u043c, \u043a\u0442\u043e \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u0442\u0430\u043d\u0434\u0435\u043c\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0432\u044c\u044e, \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u2014 \u0432\u043e\u0442 \u0432\u0430\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, imageToReveal \u044f \u0441\u043f\u0440\u044f\u0442\u0430\u043b \u0432 storyboard (\u0433\u0430\u043b\u043e\u0447\u043a\u0430 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 hidden). \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0438 \u0432 \u043a\u043e\u0434\u0435, \u043d\u043e \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0451\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0432 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435, \u0441\u0434\u0435\u043b\u0430\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443. \u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441 CABasicAnimation. \u041e\u043d\u0430 (\u043e\u043d?) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 CALayer \u2014 \u0438 \u044d\u0442\u043e \u043d\u0430\u043c \u043e\u0447\u0435\u043d\u044c \u043d\u0430 \u0440\u0443\u043a\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u0438 \u043e\u0431\u0440\u0430\u043c\u043b\u044f\u044e\u0449\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c, \u0438 \u043c\u0430\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u0438\u043f\u0430 CAShapeLayer. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u0420\u0438\u0441\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u043c\u043b\u044f\u044e\u0449\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 CAShapeLayer \u2014 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043b\u043e\u0451\u0432 \u043d\u0430\u0448\u0435\u0433\u043e UIView, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0433\u0440\u0430\u0444\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c. \u0410 \u0437\u0430\u0442\u0435\u043c \u043c\u044b, \u043a\u0430\u043a \u0432 \u0434\u0435\u0442\u0441\u043a\u0438\u0445 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0430\u0445, \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u044b \u0438 \u043a\u043e\u043d\u0442\u0443\u0440\u044b \u044d\u0442\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430.<\/p>\n<pre><code>\/\/\u0424\u0438\u0433\u0443\u0440\u0430 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0438\u0441\u0443\u043d\u043a\u0430 \u2014 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c CAShapeLayer *circle = [CAShapeLayer layer]; \/\/\u041d\u0430\u0440\u0438\u0441\u0443\u0435\u043c \u0435\u0451 \u0434\u043e \u0441\u0430\u043c\u044b\u0445 \u043a\u0440\u0430\u0451\u0432 \u043d\u0430\u0448\u0435\u0433\u043e UIView CGFloat radius = self.viewToDrawOn.frame.size.width \/ 2.0f; circle.position = CGPointZero; circle.path = [UIBezierPath bezierPathWithRoundedRect:self.viewToDrawOn.bounds                                          cornerRadius:radius].CGPath; \/\/\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0446\u0432\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043a\u0440\u0430\u0448\u0435\u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u0435\u0451 \u043a\u043e\u043d\u0442\u0443\u0440 circle.fillColor = [UIColor clearColor].CGColor; \/\/\u041d\u0435 \u043f\u0443\u0433\u0430\u0439\u0442\u0435\u0441\u044c \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f UIColor \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0446\u0432\u0435\u0442\u0430 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 Hex, \u0435\u0451 \u0432\u044b \u0442\u043e\u0436\u0435 \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 circle.strokeColor = [UIColor colorWithHex:@&quot;ffd800&quot;].CGColor; circle.lineWidth = 1.0f; [self.viewToDrawOn.layer addSublayer:circle]; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438! \u041a\u0430\u043a \u044f \u0438 \u043e\u0431\u0435\u0449\u0430\u043b, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 CAShapeLayer, \u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e strokeEnd, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0433\u0440\u0430\u0444\u0435, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0443\u0440 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0430\u0448\u0443 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e: \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439 \u0438 \u0434\u0430\u0436\u0435 \u0442\u043e, \u0441 \u043a\u0430\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (timingFunction). <\/p>\n<pre><code>\/\/\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e, \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043f\u0440\u043e\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0443\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442 0 \u0434\u043e 1 (\u0433\u0434\u0435 1 \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c) CABasicAnimation *drawAnimation = [CABasicAnimation animationWithKeyPath:@&quot;strokeEnd&quot;]; drawAnimation.duration = kAnimationDuration; drawAnimation.repeatCount = 1.0; drawAnimation.fromValue = [NSNumber numberWithFloat:0.0f]; drawAnimation.toValue = [NSNumber numberWithFloat:1.0f]; drawAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];  [circle addAnimation:drawAnimation forKey:@&quot;drawOutlineAnimation&quot;]; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0420\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u0446\u0435\u043b\u043e\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e: \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0435\u0451 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0451 \u0440\u0430\u0434\u0438\u0443\u0441 \u2014 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u044f \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u0442\u043e\u0447\u043a\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435, \u0434\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0434\u043b\u0438\u043d\u044b \u0441\u0442\u043e\u0440\u043e\u043d\u044b UIView, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u043e\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0440\u0443\u0433\u043b\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438\u043b\u0438 \u0438\u043a\u043e\u043d\u043a\u0443, \u043a\u0430\u043a \u0432 \u0442\u043e\u043c \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0435 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f). \u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 CAShapeLayer, \u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a \u043c\u0430\u0441\u043a\u0443 \u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u043b\u0438\u0448\u044c \u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0431\u0440\u0435\u0436\u0435\u0442 \u043c\u0430\u0441\u043a\u0430, \u0438 \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0430\u0441\u043a\u0430 \u2014 \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043a\u0432\u043e\u0437\u044c \u043d\u0435\u0451 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043f\u043e\u0434\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0435 \u0432 \u0449\u0435\u043b\u044c \u0432 \u0437\u0430\u0431\u043e\u0440\u0435: \u0449\u0435\u043b\u044c \u2014 \u044d\u0442\u043e \u043c\u0430\u0441\u043a\u0430, \u0438 \u0447\u0435\u043c \u043e\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0442\u0438\u043c\u043d\u044b\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0437\u0430 \u0437\u0430\u0431\u043e\u0440\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0433\u043b\u0430\u0437!<\/p>\n<pre><code>\/\/\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u043c\u0430\u0441\u043a\u0438 CGFloat initialRadius = 1.0f; CGFloat finalRadius = self.imageToReveal.bounds.size.width \/ 2.0f;  \/\/\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u043b\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043c\u0430\u0441\u043a\u0443 CAShapeLayer *revealShape = [CAShapeLayer layer]; revealShape.bounds = self.imageToReveal.bounds; \/\/\u0417\u0430\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0447\u0435\u0440\u043d\u044b\u043c \u2014 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0446\u0432\u0435\u0442, \u043a\u0440\u043e\u043c\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e revealShape.fillColor = [UIColor blackColor].CGColor;  \/\/\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0444\u0438\u0433\u0443\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u043c \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u043c\u0430\u0441\u043a\u043e\u0439: \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f UIBezierPath *startPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(CGRectGetMidX(self.imageToReveal.bounds) - initialRadius,                                                                              CGRectGetMidY(self.imageToReveal.bounds) - initialRadius, initialRadius * 2, initialRadius * 2)                                                      cornerRadius:initialRadius]; UIBezierPath *endPath = [UIBezierPath bezierPathWithRoundedRect:self.imageToReveal.bounds                                                    cornerRadius:finalRadius]; revealShape.path = startPath.CGPath; revealShape.position = CGPointMake(CGRectGetMidX(self.imageToReveal.bounds) - initialRadius,                                    CGRectGetMidY(self.imageToReveal.bounds) - initialRadius);  \/\/\u0418\u0442\u0430\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0430 \u043c\u0430\u0441\u043a\u0430, \u0438 \u0432\u0438\u0434\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0442\u0430 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043c\u0430\u0441\u043a\u043e\u0439 self.imageToReveal.layer.mask = revealShape;  \/\/\u0422\u0435\u043f\u0435\u0440\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f. \u041c\u044b \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e path \u2014 \u044d\u0442\u043e \u0433\u0440\u0430\u0444, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0444\u0438\u0433\u0443\u0440\u0443, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u044c. \u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442 \u043f\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 CABasicAnimation *revealAnimationPath = [CABasicAnimation animationWithKeyPath:@&quot;path&quot;]; revealAnimationPath.fromValue = (__bridge id)(startPath.CGPath); revealAnimationPath.toValue = (__bridge id)(endPath.CGPath); revealAnimationPath.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; revealAnimationPath.duration = kAnimationDuration\/2.0f; revealAnimationPath.repeatCount = 1.0f; \/\/\u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0447\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u044c \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043e\u0431\u0440\u0430\u043c\u043b\u044f\u044e\u0449\u0435\u0439 \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u0436\u0435 \u043f\u0440\u043e\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0430 revealAnimationPath.beginTime = CACurrentMediaTime() + kAnimationDuration\/2.0f; revealAnimationPath.delegate = self; \/\/\u0422\u0430\u043a \u043a\u0430\u043a \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439, \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e hidden \u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u0430\u0441\u043a\u0430 \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430, \u0442.\u0435. \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u043d\u0451\u0442\u0441\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043c\u0430\u0441\u043a\u0438 dispatch_time_t timeToShow = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(kAnimationDuration\/2.0f * NSEC_PER_SEC)); dispatch_after(timeToShow, dispatch_get_main_queue(), ^{     self.imageToReveal.hidden = NO; });  revealShape.path = endPath.CGPath; [revealShape addAnimation:revealAnimationPath forKey:@&quot;revealAnimation&quot;]; <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043c\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u043d\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 CAnimationGroup (\u0432\u0435\u0434\u044c \u043c\u043d\u043e\u0433\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443 \u043d\u0438\u0445 \u0441\u0445\u043e\u0436\u0438), \u0442\u043e \u044d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u044d\u0442\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u0441\u043b\u043e\u044f\u043c. \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 CAAnimation \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0435\u043c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u2014 \u043f\u0440\u0438\u0437\u043d\u0430\u044e, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u044d\u0442\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0448\u0435 \u2014 \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c!<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u2014 \u044f \u0431\u044b \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0442\u044c \u043c\u0430\u0441\u043a\u0430\u043c\u0438 \u0432\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 UIView, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u044d\u0442\u0438\u0445 \u043c\u0430\u0441\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0436\u0435 \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u043d\u043e\u0435 \u0434\u043e \u043e\u043a\u0440\u0443\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0438 \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u043c\u0430\u0441\u043a\u0443 \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451, \u0443 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/2ae\/ec4\/231\/2aeec4231b564f1a9a73f25605cb5ccf.gif\" \/><\/div>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u2014 \u043c\u043d\u0435 \u0438\u0441\u043a\u0440\u0435\u043d\u043d\u0435 \u0436\u0430\u043b\u044c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/github.com\/navoshta\/RevealImageDemo\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 Xcode<\/a> \u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0436\u0435 \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a. \u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0438 \u0434\u043e \u043d\u043e\u0432\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447!   \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/258107\/\"> http:\/\/habrahabr.ru\/post\/258107\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 <a href=\"https:\/\/medium.com\/@uxdesignagency\/the-way-digital-banking-should-work-1d278efa96a6\">\u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043e\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0431\u0430\u043d\u043a\u0430, \u043d\u043e \u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u043c\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f\u043c\u0438. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0435\u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0445 \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u043a\u043e\u043d\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u043a\u0430\u0440\u0442\u043e\u0439. <\/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-257378","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/257378","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=257378"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/257378\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=257378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=257378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=257378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}