{"id":268603,"date":"2015-11-19T23:38:05","date_gmt":"2015-11-19T20:38:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=268603"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=268603","title":{"rendered":"\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 3D Touch"},"content":{"rendered":"<p>       \u0421 \u0432\u044b\u0445\u043e\u0434\u043e\u043c iPhone 6s \u0438 iPhone 6s Plus, \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Apple \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u043c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\u043c\u0438: \u0436\u0435\u0441\u0442 \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044f. \u041a\u0430\u043a \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 Apple Watch \u0438 MacBook \u0438 \u0432 MacBook Pro \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Force Touch. \u042d\u0442\u043e \u2014 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0434\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 Force Touch \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 3D Touch \u0434\u043b\u044f iPhone, \u0442\u043e\u0433\u0434\u0430 \u0432\u044b \u043d\u0435 \u043e\u0434\u043d\u0438 \u0442\u0430\u043a\u043e\u0439. \u0412\u0441\u043a\u043e\u0440\u0435 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u041a\u0440\u0435\u0439\u0433 \u0424\u0435\u0434\u0435\u0440\u0438\u0433\u0438 (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Craig_Federighi\">Craig Federighi<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b \u044f\u0432\u043d\u043e \u043e\u0437\u0430\u0434\u0430\u0447\u0435\u043d \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b \u044d\u0442\u0443 \u043d\u043e\u0432\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0434\u043e\u0433\u0430\u0434\u043e\u043a. \u0427\u0435\u043c \u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 Force Touch? \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0448\u0443\u0442\u043e\u043a \u0438\u0437 \u0417\u0432\u0435\u0437\u0434\u043d\u044b\u0445 \u0432\u043e\u0439\u043d?<\/p>\n<p>  \u041d\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0430! \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e Force Touch \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f <b>3D Touch<\/b> \u0431\u043e\u043b\u0435\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043d\u0430\u0436\u0430\u0442\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/724\/f2b\/33b\/724f2b33bbc964950e528581cb950444.jpg\" alt=\"\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 3D Touch\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0425\u043e\u0442\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438, \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0430 iPhone \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c\u0438. \u0412\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/medium.com\/swlh\/turning-the-iphone-6s-into-a-digital-scale-f2197dc2b6e7\">Gravity<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0430\u0448 iPhone \u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0432\u0435\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Force Touch. \u0425\u043e\u0442\u044f \u043e\u043d\u043e \u0438 \u0431\u044b\u043b\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Apple \u043f\u043e \u043d\u0435\u044f\u0441\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u0438\u0434\u0435\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 3D Touch, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435!<\/p>\n<h3>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c<\/h3>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 <a href=\"https:\/\/www.dropbox.com\/s\/i3xwostpd87rqci\/ScaleStarter.zip?dl=0\">\u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>,\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0441\u043e\u0437\u0434\u0430\u043b. \u041f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0443\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <i>Single View iPhone application<\/i>. \u042f \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043b <i>(UILabels &#038; UIImage)<\/i> \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b <i>IBOutlets<\/i> \u0432 <i>ViewController.swift<\/i>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/00c\/b57\/49c\/00cb5749c29ea2565f0de5a7a374ffd8.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0438\u0437\u0430\u0439\u043d \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442: \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441 2 \u043c\u0435\u0442\u043a\u0430\u043c\u0438: \u043e\u0434\u043d\u0430 \u044d\u0442\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u043c\u0435\u0442\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0441\u0438\u043b\u044b \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d iPhone.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443! \u041d\u0430 iPhone 6s \u0438 6s Plus \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 UITouch \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0438\u043f\u0430 CGFloat, \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <b>force<\/b> \u0438 <b>maximumPossibleForce<\/b>. Force \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442, \u0442\u043e \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0441\u0430\u043d\u0438\u0435, \u0433\u0434\u0435 1.0 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043a\u0430\u0441\u0430\u043d\u0438\u0435. MaximumPossibleForce \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u043b\u0443 \u0434\u043b\u044f \u043a\u0430\u0441\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0412\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0441\u0435\u043d\u0441\u043e\u0440, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 touchesBegan, \u0430 \u0437\u0430\u0442\u0435\u043c touchesMoved, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e\u0434\u0438\u0442 \u0441\u0432\u043e\u0438\u043c \u043f\u0430\u043b\u044c\u0446\u0435\u043c \u043f\u043e \u044d\u043a\u0440\u0430\u043d\u0443, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <i>touchedCancelled<\/i> \u0438\u043b\u0438 TouchesEnded \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u043c\u0435\u0442\u043e\u0434 <i>touchesMoved<\/i> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d. TouchesMoved \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: touches (\u043a\u0430\u0441\u0430\u043d\u0438\u044f) \u0438 event (\u0441\u043e\u0431\u044b\u0442\u0438\u0435). \u041a\u0430\u0441\u0430\u043d\u0438\u044f \u2014 \u043d\u0430\u0431\u043e\u0440 (\u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432) \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 UITouch. \u0414\u043b\u044f \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043d\u043e \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442 UITouch, \u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0440\u0430\u0432\u0435\u043d \u043b\u0438 touches.first (\u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 UITouch \u0441\u0435\u043d\u0441\u043e\u0440\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430) nil \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438. \u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 <i>ViewController.swift<\/i>:  <\/p>\n<pre><code class=\"objectivec\">override func touchesMoved(touches: Set&lt;UITouch&gt;, withEvent event: UIEvent?) {     if let touch = touches.first {         if #available(iOS 9.0, *) {             if traitCollection.forceTouchCapability == UIForceTouchCapability.Available {                 \/\/ 3D Touch capable             }         }     } } <\/code><\/pre>\n<p>  \u0412 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <b>if<\/b> \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e 3D Touch. \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043b\u044f \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 App Store, \u044d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a iPhone 6 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 3D Touch.<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0430 iOS 9.0 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445. \u042f \u0434\u0435\u043b\u0430\u044e \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 <b>#available<\/b>, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432 Swift 2.0. \u0415\u0441\u043b\u0438 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u0432 Swift 2.0, \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0430\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u0421\u043d\u043e\u0432\u0430 \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f 9.0 \u0438\u043b\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0438\u043b\u0443 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445, \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435 \u0441\u0438\u043b\u0443 \u043a\u0430\u0441\u0430\u043d\u0438\u044f \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u043b\u0443 (\u0442.\u0435. touch.maximumPossibleForce), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u0441\u0438\u043b\u043e\u0439 \u043d\u0430\u0436\u0430\u0442\u0438\u044f. \u0422\u043e\u0433\u0434\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u043c\u0435\u0442\u043a\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"objectivec\">override func touchesMoved(touches: Set&lt;UITouch&gt;, withEvent event: UIEvent?) {     if let touch = touches.first {         if #available(iOS 9.0, *) {             if traitCollection.forceTouchCapability == UIForceTouchCapability.Available {                 \/\/ 3D Touch capable                 let force = touch.force\/touch.maximumPossibleForce                 forceLabel.text = &quot;\\(force)% force&quot;             }         }     } } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 iPhone 6s\/6s Plus, \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0438\u043b\u0443 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d. \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0448\u043a\u0430\u043b\u0443, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0430\u043c\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0432\u0437\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c iPhone. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"https:\/\/medium.com\/swlh\/turning-the-iphone-6s-into-a-digital-scale-f2197dc2b6e7\">\u0420\u0430\u0439\u0430\u043d\u0443 \u041c\u0430\u043a\u043b\u0438\u0434\u0443<\/a>, \u0434\u0430\u0442\u0447\u0438\u043a \u0432\u0437\u0432\u0435\u0441\u0438\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0441\u0430 ~385g. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c <b>maximumPossibleForce<\/b> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 385 \u0433\u0440\u0430\u043c\u043c\u0430\u043c (\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e 3.8 \u041d\u044c\u044e\u0442\u043e\u043d\u0430). \u041f\u0443\u0442\u0435\u043c \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c % \u0441\u0438\u043b\u044b \u0432 \u0433\u0440\u0430\u043c\u043c\u044b. \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0441\u0438\u043b\u044b \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 385. \u0414\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432\u0435\u0441\u043e\u043c 385 \u0433\u0440\u0430\u043c\u043c\u043e\u0432 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u043c\u0435\u0442\u043a\u0443 \u043d\u0430 \u201c385+ grams\u201d.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"objectivec\">override func touchesMoved(touches: Set&lt;UITouch&gt;, withEvent event: UIEvent?) {             if let touch = touches.first {         if #available(iOS 9.0, *) {             if traitCollection.forceTouchCapability == UIForceTouchCapability.Available {                 if touch.force &gt;= touch.maximumPossibleForce {                     forceLabel.text = &quot;385+ grams&quot;                 } else {                     let force = touch.force\/touch.maximumPossibleForce                     let grams = force * 385                     let roundGrams = Int(grams)                     forceLabel.text = &quot;\\(roundGrams) grams&quot;                 }             }         }     } } <\/code><\/pre>\n<p>  <i>\u041a\u0440\u0443\u0442\u043e! \u0412\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441\u0432\u043e\u0435 Digital Scale \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/i><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/044\/447\/4b3\/0444474b338751b4da1ab66357077066.png\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441 \u0434\u043e \u043d\u0443\u043b\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0443\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0438\u043b\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0435 \u043a\u0430\u0441\u0430\u0442\u044c\u0441\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c touchesEnded \u043c\u0435\u0442\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043c\u0435\u0442\u043a\u0443.  <\/p>\n<pre><code class=\"objectivec\">override func touchesEnded(touches: Set&lt;UITouch&gt;, withEvent event: UIEvent?) {     forceLabel.text = &quot;0 gram&quot; } <\/code><\/pre>\n<h3>\u0411\u044b\u0441\u0442\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435<\/h3>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 3D Touch \u2014 \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435. Quick Actions \u0434\u0430\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043c\u0435\u043d\u044e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u041f\u0440\u043e\u0441\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u0437\u043d\u0430\u0447\u043e\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0438 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043c\u0435\u043d\u044e. \u0421 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 3D Touch, \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043a <a href=\"https:\/\/itunes.apple.com\/ru\/app\/twitter\/id333903271?mt=8\">Twitter<\/a> \u0438 <a href=\"https:\/\/itunes.apple.com\/ru\/app\/instagram\/id389801252?mt=8\">Instagram<\/a> \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u0443 \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/529\/654\/f2b\/529654f2b304ece9ac253d66de613e0b.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c Quick Actions \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0441\u0438\u043d\u0438\u043c \u0444\u043e\u043d\u043e\u043c \u0432\u043c\u0435\u0441\u0442\u043e \u0431\u0435\u043b\u043e\u0433\u043e. \u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Quick Actions, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <i>info.plist<\/i> \u0412\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043f\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 Scale \u0432 \u043d\u0430\u0432\u0438\u0433\u0430\u0442\u043e\u0440\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 Scale target \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 Info). \u0412 \u0444\u0430\u0439\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u2018UIApplicationShortcutItems\u2019 \u0442\u0438\u043f \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 (Array). \u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:  <\/p>\n<ul>\n<li><b>UIApplicationShortcutItemType<\/b> (<i>\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/i>): \u0441\u0442\u0440\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0425\u043e\u0440\u043e\u0448\u0430\u044f \u0438\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0412\u0430\u0448\u0435\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443.<\/li>\n<li><b>UIApplicationShortcutItemTitle<\/b> (<i>\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/i>): \u0441\u0442\u0440\u043e\u043a\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0434\u043b\u044f Quick Action \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u201cShow last picture taken\u201d.<\/li>\n<li><b>UIApplicationShortcutItemSubtitle<\/b> (<i>\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/i>): \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e Quick Action. \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c\u201cLast picture taken yesterday\u201d. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043a\u043e\u043d\u043a\u0443 \u0434\u043b\u044f Quick Action, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430: \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0438\u043a\u043e\u043d\u043a\u0430 \u043e\u0442 Apple \u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0438\u043a\u043e\u043d\u043a\u0430.<\/li>\n<li><b>UIApplicationShortcutItemIconType<\/b> (<i>\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/i>): \u0441\u0442\u0440\u043e\u043a\u0430, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f, \u043a\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0438\u043a\u043e\u043d\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 Quick Action.<\/li>\n<li><b>UIApplicationShortcutItemIconFile<\/b> (<i>\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/i>): \u0441\u0442\u0440\u043e\u043a\u0430, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f, \u043a\u0430\u043a\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0438\u043a\u043e\u043d\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 Quick Action.<\/li>\n<li><b>UIApplicationShortcutItemUserInfo<\/b> (<i>\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/i>): \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Quick Action.<\/li>\n<\/ul>\n<p>  \u0412 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0447\u0435\u0442\u044b\u0440\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Quick Action \u00abOpenBlue\u00bb. \u0422\u0435\u043f\u0435\u0440\u044c <b>info.plist<\/b> \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5e7\/415\/bb7\/5e7415bb79fc513a10f45ec02804c595.png\" alt=\"image\"\/><\/p>\n<p>  <i>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u2018<b>$(PRODUCT_BUNDLE_IDENTIFIER)<\/b>\u2019 \u0432\u043c\u0435\u0441\u0442\u043e \u2018<b>com.appcoda.Scale<\/b>\u2019 \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435. \u042d\u0442\u043e \u0432 \u0446\u0435\u043b\u044f\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438: \u0435\u0441\u043b\u0438, \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u044f \u0438\u0437\u043c\u0435\u043d\u044e Bundle ID \u0432 \u2018General\u2019, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442 \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0432\u0435\u0437\u0434\u0435. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0432\u0435\u0437\u0434\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0412 \u0432\u0430\u0448\u0435\u043c \u0444\u0430\u0439\u043b\u0435 info.plist, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043a\u043b\u044e\u0447 <b>Bundle Identifier<\/b> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u0442 \u0436\u0435 \u043f\u043e\u0434\u0445\u043e\u0434: &#8216;<b>$(PRODUCT_BUNDLE_IDENTIFIER)<\/b>&#8216; \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/i><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c Quick action, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0435\u0433\u043e. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 <i>AppDelegate.swift<\/i> \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <i>performActionForShortcutItem<\/i>. \u041a\u043e\u0433\u0434\u0430 Quick Action \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0432\u044b\u0437\u043e\u0432\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:  <\/p>\n<pre><code class=\"objectivec\">func application(application: UIApplication, performActionForShortcutItem shortcutItem: UIApplicationShortcutItem, completionHandler: (Bool) -&gt; Void) {          \/\/ Handle quick actions     completionHandler(handleQuickAction(shortcutItem)) } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f, \u0432\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0431\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0451\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0441\u043f\u0435\u0445\u0430\/\u043e\u0442\u043a\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <i>handleQuickAction<\/i>, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u041e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 Quick Action \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u2018<i>UIApplicationShortcutItemType<\/i>\u2019 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041e\u0431\u044a\u044f\u0432\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0439\u0442\u0435 \u043c\u0435\u0442\u043e\u0434 <i>handleQuickAction<\/i>, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u0441\u0438\u043d\u0438\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:  <\/p>\n<pre><code class=\"objectivec\">enum Shortcut: String {     case openBlue = &quot;OpenBlue&quot; }   func handleQuickAction(shortcutItem: UIApplicationShortcutItem) -&gt; Bool {          var quickActionHandled = false     let type = shortcutItem.type.componentsSeparatedByString(&quot;.&quot;).last!     if let shortcutType = Shortcut.init(rawValue: type) {         switch shortcutType {         case .openBlue:             self.window?.backgroundColor = UIColor(red: 151.0\/255.0, green: 187.0\/255.0, blue: 255.0\/255.0, alpha: 1.0)             quickActionHandled = true         }     }          return quickActionHandled } <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0415\u0441\u043b\u0438 \u0432\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0444\u043e\u043d \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0438\u043d\u0438\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2d6\/9df\/3ca\/2d69df3ca0fefa9cae86b083593c3439.png\" alt=\"image\"\/><\/p>\n<h3>\u041e \u0447\u0435\u043c \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c?<\/h3>\n<p>  \u0415\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c. \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e\u0437\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Quick Action. \u0422\u0430\u043a \u043a\u0430\u043a \u0412\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b <i>willFinishLaunchingWithOptions<\/i> \u0437\u0430\u0442\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <i>anddidFinishLaunchingWithOptions<\/i>. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c Quick Actions, \u0442\u043e \u043e\u043d \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <i>performActionForShortcutItem<\/i>.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/b47\/ce7\/392\/b47ce7392df0ad539bb62a99465ab8e0.png\" alt=\"image\"\/><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 didFinishLaunchingWithOptions, \u0442\u043e \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u0431\u0435\u043b\u044b\u043c. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u043e, \u0447\u0435\u0440\u0435\u0437 \u0438\u043a\u043e\u043d\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code class=\"objectivec\">func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions:     [NSObject: AnyObject]?) -&gt; Bool {     \/\/ Override point for customization after application launch.     self.window?.backgroundColor = UIColor.whiteColor()              return true } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u043e\u0442\u043a\u0443\u0434\u0430 \u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u044c\u0441\u044f <i>willFinish<\/i>, <i>didFinish<\/i>, \u0430 \u0437\u0430\u0442\u0435\u043c <i>performActionForShortcutItem<\/i>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u043b\u044b\u0439 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0438\u043d\u0438\u0439. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0412\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u0431\u0435\u043b\u044b\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <i>didFinishLaunchingWithOptions<\/i>:  <\/p>\n<pre><code class=\"objectivec\">func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions:     [NSObject: AnyObject]?) -&gt; Bool {     print(&quot;didFinishLaunchingWithOptions called&quot;)     var isLaunchedFromQuickAction = false         \/\/ Check if it's launched from Quick Action     if let shortcutItem = launchOptions?[UIApplicationLaunchOptionsShortcutItemKey] as? UIApplicationShortcutItem {                  isLaunchedFromQuickAction = true         \/\/ Handle the sortcutItem         handleQuickAction(shortcutItem)     } else {         self.window?.backgroundColor = UIColor.whiteColor()     }          \/\/ Return false if the app was launched from a shortcut, so performAction... will not be called.     return !isLaunchedFromQuickAction } <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c Quick Action, \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 <i>UIApplicationLaunchOptionsShortcutItemKey<\/i>. \u041e\u0431\u044a\u0435\u043a\u0442 <i>UIApplicationShortcutItem<\/i> \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043f\u0443\u0442\u0435\u043c Quick Action, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <i>handleQuickAction<\/i>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u043e\u043d \u043d\u0430 \u0441\u0438\u043d\u0438\u0439.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 <i>didFinishLaunchingWithOptions<\/i>, \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <i>performActionForShortcutItem<\/i>, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <i>handleQuickAction<\/i> \u0441\u043d\u043e\u0432\u0430. \u041f\u043e\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 false, \u0441\u043e\u043e\u0431\u0449\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 performActionForShortcutItem.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435! \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. Quick Action \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e.<\/p>\n<h3>\u0418\u0442\u043e\u0433<\/h3>\n<p>  <b>3D Touch<\/b> \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a \u0412\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 3D Touch, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c Quick Actions \u043a \u0432\u0430\u0448\u0435\u043c\u0443 iOS \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0438\u043b\u0443 \u043a\u0430\u0441\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/www.dropbox.com\/s\/yf8nkupi9yt01hk\/ScaleFinal.zip?dl=0\">\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 Xcode<\/a>. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u044b\u0441\u043b\u044f\u043c\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043e\u0431 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0438 3D Touch.       <\/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\/271291\/\"> http:\/\/habrahabr.ru\/post\/271291\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0421 \u0432\u044b\u0445\u043e\u0434\u043e\u043c iPhone 6s \u0438 iPhone 6s Plus, \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Apple \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u043c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430\u043c\u0438: \u0436\u0435\u0441\u0442 \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044f. \u041a\u0430\u043a \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 Apple Watch \u0438 MacBook \u0438 \u0432 MacBook Pro \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Force Touch. \u042d\u0442\u043e \u2014 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0434\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 Force Touch \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 3D Touch \u0434\u043b\u044f iPhone, \u0442\u043e\u0433\u0434\u0430 \u0432\u044b \u043d\u0435 \u043e\u0434\u043d\u0438 \u0442\u0430\u043a\u043e\u0439. \u0412\u0441\u043a\u043e\u0440\u0435 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u041a\u0440\u0435\u0439\u0433 \u0424\u0435\u0434\u0435\u0440\u0438\u0433\u0438 (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Craig_Federighi\">Craig Federighi<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b \u044f\u0432\u043d\u043e \u043e\u0437\u0430\u0434\u0430\u0447\u0435\u043d \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b \u044d\u0442\u0443 \u043d\u043e\u0432\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0434\u043e\u0433\u0430\u0434\u043e\u043a. \u0427\u0435\u043c \u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 Force Touch? \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0448\u0443\u0442\u043e\u043a \u0438\u0437 \u0417\u0432\u0435\u0437\u0434\u043d\u044b\u0445 \u0432\u043e\u0439\u043d?<\/p>\n<p>  \u041d\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0430! \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e Force Touch \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f <b>3D Touch<\/b> \u0431\u043e\u043b\u0435\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043d\u0430\u0436\u0430\u0442\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/724\/f2b\/33b\/724f2b33bbc964950e528581cb950444.jpg\" alt=\"\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 3D Touch\"\/>  <\/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-268603","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268603","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=268603"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268603\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}