{"id":277044,"date":"2016-03-27T21:35:01","date_gmt":"2016-03-27T17:35:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277044"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277044","title":{"rendered":"Casual-\u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043f\u043e\u0434 Swift"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b94\/f35\/202\/b94f35202f374560bbe29f16402d43d2.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0431\u0440\u0430\u0442\u044c\u044f \u0432\u043e swift-e. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438 \u043c\u043d\u0435 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0441\u0435\u0439 \u043f\u0442\u0438\u0447\u0438\u0439 \u044f\u0437\u044b\u043a, \u0438 \u043d\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0447\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043f\u043e\u0434 \u0438\u0441\u0442\u0440\u0435\u043f\u0430\u043d\u043d\u044b\u0439 iPhone. \u041c\u0435\u043d\u044f \u0434\u0430\u0432\u043d\u043e \u043a\u0443\u0441\u0430\u043b\u0430 \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0430, \u0430 \u0442\u0443\u0442 \u0440\u0430\u0437! \u0418 \u0432\u0434\u0440\u0443\u0433 \u043d\u0430 \u0441\u0432\u0438\u0444\u0442\u0435. \u041a\u043e\u0434 \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043c\u0435\u0448\u043d\u043e, \u0437\u0430\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0421\u0430\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0433\u0440\u044b \u044f \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043e\u043d \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u0435\u043d \u0434\u043b\u044f \u043c\u0435\u0441\u0442\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043d\u0435 \u0443\u043c\u0435\u044e\u0449\u0435\u0439 \u0432 \u0443\u043c\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c 111 \u043d\u0430 3. \u0410 \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 casual game \u2014 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c<\/h4>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u0433\u0440\u0435 \u043d\u0443\u0436\u0435\u043d \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043e\u0432 \u0438 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e \u0435\u0449\u0435 \u0447\u0435\u0433\u043e. <br \/>  \u0415\u0441\u043b\u0438 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0414\u0436\u0430\u0432\u0430, JS \u0438 \u0421 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e (\u0432\u0435\u0434\u044c \u0412\u0430\u0448\u0430 \u0438\u0433\u0440\u0430 \u043d\u0430 \u0432\u0441\u0435\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430?), \u0442\u043e \u043d\u0430 Swift \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0442\u044b\u043a\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0434. \u0412\u043c\u0435\u0441\u0442\u043e 2 \u0441\u0442\u0440\u043e\u043a \u043e\u043d \u0441\u0442\u0430\u043b \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c 4 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<pre><code class=\"cpp\">    var holdrand  = 0          func microsoft_rnd()-&gt;Int {         var k = Int.multiplyWithOverflow(holdrand, 214013)         k = Int.addWithOverflow(k.0, 2531011)         holdrand =  k.0         return Int((holdrand &gt;&gt; 16)  & 0x7FFF)     }          func microsoft_rand(number:Int)-&gt;Int {         return microsoft_rnd() % number     } <\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0421-\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u0438\u043a\u0441\u043e\u0444\u043e\u0442\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430, \u0432\u044b\u0434\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0439 \u0438\u0437 MSVC 15 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434.  <\/p>\n<pre><code class=\"cpp\">- (int)microsoft_rnd { \tholdrand = holdrand * 214013  + 2531011; \treturn ((holdrand &gt;&gt; 16)  & 0x7FFF); }  - (int) microsoft_rand:(int) number{ \treturn [self microsoft_rnd] % number; } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c Swift \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u043e\u0433 \u043a \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0433\u043e\u043b\u043e\u0432\u043d\u044b\u0435 \u0431\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443, \u043d\u043e, \u0432\u0438\u0434\u0438\u043c\u043e, \u0441\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0442\u0440\u0435\u0441\u0441 \u0441 runtime-\u044e\u0437\u0435\u0440\u0430.<\/p>\n<p>  \u0422\u0430\u043a \u0432\u043e\u0442. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e holdrand \u0441\u043a\u0430\u0436\u0435\u043c \u0432 25, \u043c\u044b \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0440\u0430\u0441\u043a\u043b\u0430\u0434 \u0434\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f 25 \u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0438 \u2014 \u0431\u0443\u0434\u044c \u043e\u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 PHP \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043b\u0438\u0431\u043e \u043d\u0430 Swift \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u043d\u0430 iPhone. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0431\u0440\u0430\u0442\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0438\u0433\u0440\u0430\u044e\u0449\u0438\u0445 \u2014 \u043e\u043d\u0438 \u043a\u0430\u043a \u0431\u044b \u0432\u0441\u0435 \u043e\u0444\u0444\u043b\u0430\u0439\u043d, \u043d\u043e \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043e\u0447\u043d\u043e \u0441\u043e\u0440\u0435\u0432\u043d\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u0430\u0445. \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0442\u0443\u0440\u043d\u0438\u0440 \u043f\u043e \u0438\u0433\u0440\u0435 \u0432 \u0411\u0440\u0438\u0434\u0436. \u0414\u0430\u0432\u043d\u043e \u044f \u043d\u0435 \u0438\u0433\u0440\u0430\u043b \u0432 \u0431\u0440\u0438\u0434\u0436, \u043a\u0441\u0442\u0430\u0442\u0438.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Swift \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Xcode. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0438 <i>File-&gt;New-&gt;Project&#8230;-&gt;Single View Application<\/i> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442-\u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443, \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <i>AppDelegate.swift<\/i> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0443\u0433\u0430\u044e\u0449\u0435 \u043f\u0440\u043e\u0441\u0442\u043e<\/p>\n<pre><code class=\"cpp\"> import UIKit  @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {      var window: UIWindow?          func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {         \/\/ Override point for customization after application launch.     } }   <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d Obj-C? \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0432\u0443\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0441\u0442\u0430\u043b \u043e\u0434\u0438\u043d. \u042d\u0442\u043e \u044f \u043e\u0434\u043e\u0431\u0440\u044f\u044e.<br \/>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b? \u0438!.. \u041d\u0435 \u043f\u0443\u0433\u0430\u0439\u0442\u0435\u0441\u044c, \u044d\u0442\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0442\u0438\u043f\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f x:Float! \u2014 \u0442\u043e \u0442\u043e\u0447\u043d\u043e Float, \u0435\u0441\u043b\u0438 x:Float? \u2014 \u0442\u043e \u0430\u0432\u0442\u043e\u0440 \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 Float.<\/p>\n<p>  \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, Xcode \u0441\u0430\u043c \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u0434\u044b \u044d\u0442\u0438 \u0437\u043d\u0430\u043a\u0438, \u0438 \u043f\u043e\u0441\u043b\u0435 \u0434\u043d\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0412\u044b \u043d\u0430\u0447\u043d\u0435\u0442\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0434\u0438\u043e\u0442\u0441\u043a\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. <\/p>\n<h4>\u0420\u0435\u043a\u043b\u0430\u043c\u0430<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043d\u043e \u043d\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e? \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0440\u0435\u043a\u043b\u0430\u043c\u0430. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u0442 class AppDelegate \u0435\u0435 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e GoogleMobileAds \u0441\u043e \u0421\u0432\u0438\u0444\u0442\u043e\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0438\u0448\u0435\u043c \u043f\u0430\u0440\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <\/p>\n<pre><code class=\"cpp\">import UIKit import GoogleMobileAds  @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {     var window: UIWindow?     var bannerView: GADBannerView!     var iPhone5 = true              func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {         startAds()         return true     }          func startAds() {         bannerView = GADBannerView(adSize: kGADAdSizeBanner)         print(&quot;Google Mobile Ads SDK version: &quot; + GADRequest.sdkVersion())         bannerView.adUnitID = yourAdMobID         bannerView.rootViewController = self.window?.rootViewController         let adViewHeight = bannerView.frame.size.height         print(&quot;adViewHeight: \\(adViewHeight)&quot;)         let screenSize: CGRect = UIScreen.mainScreen().bounds         let screenHeight = screenSize.height         bannerView.frame.origin = CGPointMake(0, screenHeight -  adViewHeight)         let request = GADRequest()         request.testDevices = [kGADSimulatorID ]         self.window?.rootViewController!.view.addSubview(bannerView)         bannerView.loadRequest(request)  \/\/ \u0417\u0430\u043e\u0434\u043d\u043e \u0438 \u0444\u043b\u0430\u0433 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c, \u0447\u0442\u043e\u0431 2 \u0440\u0430\u0437\u0430 \u043d\u0435 \u0445\u043e\u0434\u0438\u0442\u044c        iPhone5 = screenHeight&lt;heightOfScreenOfiPhone5AndMoreInLogicalPixels ? false : true     }          func bringAdsToFront() {         self.window?.rootViewController!.view.bringSubviewToFront(bannerView)     } }   <\/code><\/pre>\n<p>  \u0412 \u0442\u0435\u043b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432\u044b\u0437\u043e\u0432 startAds(). <br \/>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f bringAdsToFront() \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430, \u043d\u043e \u0412\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 ViewControllers, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0430\u043d\u043d\u0435\u0440 \u043d\u0430\u0434\u043e \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0441\u0435\u0445 \u043e\u043a\u043e\u043d \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f iPhone5 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430, \u043a\u0430\u043a \u0432\u043e\u0437\u0434\u0443\u0445, \u043f\u043e\u043a\u0430 \u0436\u0438\u0432\u044b \u0434\u0432\u0430 Aspect Ratio \u0432 iOS. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e 5% \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435 \u0435\u0449\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 4 iPhone, \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u0432\u0441\u0435\u0445 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u0412\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 iPhone only, \u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0435\u0433\u043e \u043d\u0430 iPad \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0441\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 \u0440\u0435\u0436\u0438\u043c 320 \u043d\u0430 480 \u043f\u0438\u043a\u0441\u0435\u043b\u043e\u0432.<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u044e \u0431\u0430\u043d\u043d\u0435\u0440? \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443 \u043c\u0435\u043d\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u0440\u0430\u0442\u044c \u0432 \u043c\u0435\u0442\u0440\u043e \u043e\u0434\u043d\u043e\u0439 \u0440\u0443\u043a\u043e\u0439 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u2014 <i>\u041f\u043e\u0440\u0442\u0440\u0435\u0442<\/i>. \u0418 \u0440\u0435\u043a\u043b\u0430\u043c\u0443 320\u044550 \u044f \u0441\u043f\u0443\u0441\u043a\u0430\u044e \u0432\u043d\u0438\u0437 \u044d\u043a\u0440\u0430\u043d\u0430, \u044d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0434\u0432\u043e\u0435. \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u0443\u0436\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b 40 \u0446\u0435\u043d\u0442\u043e\u0432 \u0421\u0428\u0410.<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0412\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Swift.<\/p>\n<h4>\u0417\u0432\u0443\u043a<\/h4>\n<p>  \u0427\u0442\u043e \u0435\u0449\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0438\u0433\u0440\u0435, \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u043e\u0439 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u0439? \u0417\u0432\u0443\u043a\u0438 \u041c\u0443.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c.<\/p>\n<pre><code class=\"cpp\"> import UIKit  @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {     var window: UIWindow?     var soundLib: SoundController?          func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {       soundLib = SoundController.init()    }      func setVolume(v:Double) {         soundLib?.setVolume(v*v)     }          func playSound(i:Int) {         soundLib?.playSound(i)     } }   <\/code><\/pre>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043c \u0434\u0435\u0441\u044f\u0442\u043e\u043a mp3 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u044b\u0442\u0430\u0449\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 Google, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 SoundController \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">SoundController.swift<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/\/  Created by Vadim Bashurov on 3\/19\/16. \/\/  import UIKit import AVFoundation  class SoundController {     let audioFiles: [String: String] = [         &quot;Ashley_glad_1&quot;: &quot;caf&quot;,         &quot;star_first&quot;: &quot;caf&quot;,         &quot;bird shot-a3&quot;: &quot;caf&quot;,         &quot;bouncer&quot;:&quot;caf&quot;,         &quot;bird shot-a3&quot;:&quot;mp3&quot;,         &quot;ball_bounce&quot;:&quot;mp3&quot;,         &quot;bird_a4&quot;:&quot;mp3&quot;,         &quot;HittingBasketBoard&quot;:&quot;mp3&quot;,         &quot;piglette_a1&quot;:&quot;mp3&quot;,         ]          var players : [AVAudioPlayer] = []     var volume = 0.0          init () {         for (name, ext) in audioFiles {             let a1 = self.setupAudioPlayerWithFile(name, type:ext)             players.append(a1!)         }     }          func setVolume(v:Double) {         volume = v         for audioPlayer in players {             audioPlayer.volume = Float(volume)         }     }          func playSound(i:Int)     {         let audioPlayer = players[i]         audioPlayer.play()     }          func setupAudioPlayerWithFile(file:NSString, type:NSString) -&gt; AVAudioPlayer?  {         let path = NSBundle.mainBundle().pathForResource(file as String, ofType: type as String)         let url = NSURL.fileURLWithPath(path!)         var audioPlayer:AVAudioPlayer?         do {             try audioPlayer = AVAudioPlayer(contentsOfURL: url)             audioPlayer!.prepareToPlay()                      } catch {             print(&quot;Player not available&quot;)         }         return audioPlayer     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044f \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u043b \u0432\u0441\u0435 4 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u0430 \u043f\u043e\u0434 iOS. \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0437\u0432\u0443\u043a\u0438 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0433\u0440\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u043d\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044e\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f. AudioService \u0438\u0437 OAL \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u043d\u043e\u0439 \u043d\u0430 Swift \u043d\u0435 \u043e\u0441\u0432\u043e\u0435\u043d\u0430, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0440\u043e\u0448\u0443 bridge \u0438 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e Obj-C \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 preload, \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>  \u0418 \u043d\u0430 \u0441\u043b\u0430\u0434\u043a\u043e\u0435, \u043f\u043e\u043f\u0440\u044b\u0433\u0443\u043d\u0447\u0438\u043a\u0438!<\/p>\n<h4>\u041f\u043e\u043f\u0440\u044b\u0433\u0443\u043d\u0447\u0438\u043a\u0438<\/h4>\n<p>  \u0412\u0441\u0435 \u0432\u0430\u0448\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430\u0434\u043f\u0438\u0441\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435, \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430\u043c \u0438\u0437 \u0441\u043a\u0430\u0437\u043e\u0447\u043d\u043e\u0433\u043e \u043c\u0438\u0440\u0430. \u041b\u0438\u0431\u043e \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0442\u044c, \u043b\u0438\u0431\u043e \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0442\u044c, \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u0437 \u0442\u0435\u043d\u0438 \u0438 \u043f\u043e\u0434\u0440\u044b\u0433\u0438\u0432\u0430\u0442\u044c. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 iOS 8 Apple \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043b\u0435\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f bouncing \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440  <\/p>\n<pre><code class=\"objectivec\">                    UIView.animateWithDuration(1.2, delay: 0.1, usingSpringWithDamping: 0.3, initialSpringVelocity: 0.0, options: UIViewAnimationOptions.CurveLinear, animations: {                                                          box1.center = CGPointMake(box2.center.x,box2.center.y)                                                          },                             completion: {finished in                                 self.showFingers()                         })                                               <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0449\u0438\u043a 1 \u0443\u043f\u0430\u0434\u0435\u0442 \u043d\u0430 \u044f\u0449\u0438\u043a 2 (\u044d\u0442\u043e \u0441\u044e\u0436\u0435\u0442 \u043c\u043e\u0435\u0439 \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0438) \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0443\u043f\u043e, \u0430 \u0441 \u043f\u043e\u0434\u0441\u043a\u043e\u043a\u0430\u043c\u0438, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0438\u0440\u043d\u043e \u0443\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u0441\u044f.<br \/>  \u0424\u0438\u0437\u0438\u043a\u0443 \u043f\u043e\u0434\u0441\u043a\u043e\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u0430\u0440\u044c\u0438\u0440\u043e\u0432\u0430\u0442\u044c 3 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u2014 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u2014 \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e 1.2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0437\u0430\u0434\u0435\u0440\u0436\u0430\u043d \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u043f\u0430\u0434\u0435\u043d\u0438\u044f, \u043e\u043d \u043d\u0430 bouncing \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442, \u0430 3 \u0438 4 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 0 \u0434\u043e 1 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u044b\u0436\u043a\u0430. \u0415\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 1, \u0442\u043e \u043e\u0442\u0441\u043a\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0415\u0441\u043b\u0438 \u0432 \u043d\u043e\u043b\u044c, \u044f\u0449\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0430\u043a\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u043e\u0448\u044c \u043d\u0430 \u0432\u0435\u0442\u043a\u0435.<\/p>\n<p>  \u041f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0440\u0443\u0439\u0442\u0435 \u0441\u0430\u043c\u0438, \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u0442\u0438\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u0435\u0441\u0435\u043b\u043e\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0412\u044b \u0433\u043e\u0442\u043e\u0432\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0443\u044e \u0438\u0433\u0440\u0443\u043b\u044c\u043a\u0443 \u043d\u0430 Swift \u0438 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 \u043d\u0430 \u043f\u0438\u0432\u043e. \u0427\u0430\u043e!               <\/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=\"https:\/\/habrahabr.ru\/post\/280266\/\"> https:\/\/habrahabr.ru\/post\/280266\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b94\/f35\/202\/b94f35202f374560bbe29f16402d43d2.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0431\u0440\u0430\u0442\u044c\u044f \u0432\u043e swift-e. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438 \u043c\u043d\u0435 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0441\u0435\u0439 \u043f\u0442\u0438\u0447\u0438\u0439 \u044f\u0437\u044b\u043a, \u0438 \u043d\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0447\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043f\u043e\u0434 \u0438\u0441\u0442\u0440\u0435\u043f\u0430\u043d\u043d\u044b\u0439 iPhone. \u041c\u0435\u043d\u044f \u0434\u0430\u0432\u043d\u043e \u043a\u0443\u0441\u0430\u043b\u0430 \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u043e\u043b\u043e\u0432\u043e\u043b\u043e\u043c\u043a\u0430, \u0430 \u0442\u0443\u0442 \u0440\u0430\u0437! \u0418 \u0432\u0434\u0440\u0443\u0433 \u043d\u0430 \u0441\u0432\u0438\u0444\u0442\u0435. \u041a\u043e\u0434 \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043c\u0435\u0448\u043d\u043e, \u0437\u0430\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0421\u0430\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0433\u0440\u044b \u044f \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043e\u043d \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u0435\u043d \u0434\u043b\u044f \u043c\u0435\u0441\u0442\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043d\u0435 \u0443\u043c\u0435\u044e\u0449\u0435\u0439 \u0432 \u0443\u043c\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c 111 \u043d\u0430 3. \u0410 \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 casual game \u2014 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.  <\/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-277044","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277044","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=277044"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277044\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}