{"id":1217,"date":"2016-06-23T15:55:34","date_gmt":"2016-06-23T08:55:34","guid":{"rendered":"http:\/\/www.booboohome.com\/blogs\/?p=1217"},"modified":"2025-08-10T15:59:15","modified_gmt":"2025-08-10T08:59:15","slug":"ios-tutorial-begin-with-swift-day-8","status":"publish","type":"post","link":"https:\/\/www.booboohome.com\/blogs\/2016\/06\/ios-tutorial-begin-with-swift-day-8\/","title":{"rendered":"iOS Tutorial &#8211; Begin with swift ( day 8 ) &#8211; Properties"},"content":{"rendered":"<p><a href=\"https:\/\/www.booboohome.com\/blogs\/wp-content\/uploads\/2016\/06\/swift-128x128.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1126\" src=\"https:\/\/www.booboohome.com\/blogs\/wp-content\/uploads\/2016\/06\/swift-128x128.png\" alt=\"swift-128x128\" width=\"128\" height=\"128\" \/><\/a><\/p>\n<p><strong>\u0e23\u0e39\u0e49\u0e08\u0e31\u0e01\u0e01\u0e31\u0e1a properties<\/strong><\/p>\n<p>properties \u0e04\u0e37\u0e2d\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e40\u0e01\u0e47\u0e1a\u0e41\u0e25\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e2b\u0e19\u0e36\u0e48\u0e07 class, structure \u0e41\u0e25\u0e30 enumeration<\/p>\n<ul>\n<li>store properties \u0e04\u0e37\u0e2d \u0e04\u0e48\u0e32\u0e04\u0e07\u0e17\u0e35\u0e48 \u0e2b\u0e23\u0e37\u0e2d\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e17\u0e35\u0e48\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01 \u0e0b\u0e36\u0e48\u0e07\u0e08\u0e30\u0e2b\u0e32\u0e44\u0e14\u0e49\u0e43\u0e19 class, structure<\/li>\n<li>compute properties \u0e04\u0e37\u0e2d \u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e04\u0e33\u0e19\u0e27\u0e13\u0e02\u0e36\u0e49\u0e19 \u0e0b\u0e36\u0e48\u0e07\u0e08\u0e30\u0e2b\u0e32\u0e44\u0e14\u0e49\u0e43\u0e19 class, structure, enumeration<\/li>\n<\/ul>\n<p><strong>store properties<\/strong><\/p>\n<p>store properties \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e08\u0e30\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e40\u0e1b\u0e47\u0e19 \u0e04\u0e48\u0e32\u0e04\u0e07\u0e17\u0e35\u0e48(\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e14\u0e49\u0e27\u0e22 let) \u0e2b\u0e23\u0e37\u0e2d\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 (\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e14\u0e49\u0e27\u0e22 var) \u0e01\u0e47\u0e44\u0e14\u0e49<\/p>\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 store properties<\/p>\n<pre class=\"prettyprint lang-swift\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">struct TrackInfo{\r\n    var length:Int\r\n    var currentTime:Int\r\n}<\/pre>\n<p>\u0e08\u0e32\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 \u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 Structure \u0e0a\u0e37\u0e48\u0e2d TrackInfo \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e44\u0e27\u0e49\u0e17\u0e33\u0e01\u0e32\u0e23\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07\u0e40\u0e1e\u0e25\u0e07\u0e41\u0e15\u0e48\u0e25\u0e30\u0e40\u0e1e\u0e25\u0e07 \u0e42\u0e14\u0e22\u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28 \u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 properties \u0e0a\u0e37\u0e48\u0e2d\u0e27\u0e48\u0e32 length \u0e0b\u0e36\u0e48\u0e07\u0e44\u0e27\u0e49\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27\u0e02\u0e2d\u0e07\u0e40\u0e1e\u0e25\u0e07\u0e19\u0e31\u0e49\u0e19\u0e41\u0e25\u0e30 currentTime \u0e44\u0e27\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 \u0e17\u0e35\u0e48\u0e40\u0e1e\u0e25\u0e07\u0e19\u0e31\u0e49\u0e19\u0e01\u0e33\u0e25\u0e31\u0e07\u0e40\u0e25\u0e48\u0e19\u0e2d\u0e22\u0e39\u0e48<\/p>\n<p><strong>lazy properties<\/strong><\/p>\n<p>\u0e40\u0e1b\u0e47\u0e19 properties \u0e15\u0e31\u0e27\u0e2b\u0e19\u0e36\u0e48\u0e07\u0e17\u0e35\u0e48 \u0e04\u0e48\u0e32\u0e15\u0e31\u0e49\u0e07\u0e15\u0e49\u0e19\u0e08\u0e30\u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e04\u0e33\u0e19\u0e27\u0e13\u0e08\u0e19\u0e01\u0e23\u0e30\u0e17\u0e31\u0e48\u0e07\u0e04\u0e23\u0e31\u0e49\u0e07\u0e41\u0e23\u0e01\u0e17\u0e35\u0e48\u0e04\u0e48\u0e32\u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49 \u0e40\u0e23\u0e32\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49 properties \u0e0a\u0e19\u0e34\u0e14\u0e19\u0e35\u0e49\u0e42\u0e14\u0e22\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28 keyword &#8220;lazy&#8221; \u0e2b\u0e19\u0e49\u0e32\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e19\u0e31\u0e49\u0e19\u0e46<\/p>\n<pre class=\"prettyprint lang-swift\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">class TrackReader{\r\n    var filename = \"abc.mp3\"\r\n    var trackInfo:TrackInfo = TrackInfo(length: 0, currentTime: 0)\r\n    \/\/ To read track from file\r\n}\r\n\r\nclass TrackPlayer{\r\n    lazy var track = TrackReader()\r\n    var data = [String]()\r\n    \/\/ To create player\r\n    \/\/ At this point TrackRead has not been load\r\n}\r\n\r\nvar player = TrackPlayer();\r\nplayer.data.append(\"Related info here\")    \r\n\/\/ \u0e08\u0e19\u0e16\u0e36\u0e07\u0e15\u0e23\u0e07\u0e19\u0e35\u0e49 track \u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e08\u0e36\u0e07\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32\u0e15\u0e31\u0e49\u0e07\u0e15\u0e49\u0e19\u0e43\u0e14\u0e46 \u0e02\u0e36\u0e49\u0e19\r\nprint(player.track.filename)     \/\/ \u0e40\u0e23\u0e34\u0e48\u0e21\u0e21\u0e35\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32\u0e15\u0e31\u0e49\u0e07\u0e15\u0e49\u0e19\u0e43\u0e2b\u0e49 track<\/pre>\n<p><strong>compute properties<\/strong><\/p>\n<p>\u0e08\u0e30\u0e44\u0e21\u0e48\u0e40\u0e01\u0e47\u0e1a\u0e04\u0e48\u0e32\u0e08\u0e23\u0e34\u0e07\u0e44\u0e27\u0e49 \u0e41\u0e15\u0e48\u0e04\u0e48\u0e32\u0e15\u0e31\u0e49\u0e07\u0e15\u0e49\u0e19\u0e17\u0e35\u0e48\u0e44\u0e14\u0e49 \u0e21\u0e32\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13\u0e04\u0e48\u0e32\u0e14\u0e49\u0e27\u0e22\u0e27\u0e34\u0e18\u0e35\u0e17\u0e35\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14<\/p>\n<p><strong>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49<\/strong><\/p>\n<pre class=\"prettyprint lang-swift\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">struct TrackInfo{\r\n    var length:Int\r\n    var currentTime:Int\r\n    var remainingTime:Int{\r\n        get{\r\n            return length - currentTime\r\n        }\r\n        set(newValue){\r\n            currentTime = length - newValue\r\n        }\r\n       \r\n    }\r\n}<\/pre>\n<p>\u0e08\u0e32\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e02\u0e49\u0e32\u0e07\u0e15\u0e49\u0e19 \u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e2d\u0e07\u0e41\u0e15\u0e48\u0e25\u0e30 track \u0e42\u0e14\u0e22 remainingTime \u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e01\u0e47\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e27\u0e25\u0e32\u0e17\u0e35\u0e48\u0e40\u0e2b\u0e25\u0e37\u0e2d\u0e2d\u0e22\u0e39\u0e48\u0e02\u0e2d\u0e07\u0e40\u0e1e\u0e25\u0e07\u0e46 \u0e19\u0e35\u0e49\u0e41\u0e25\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13\u0e23\u0e30\u0e2b\u0e27\u0e48\u0e32\u0e07 \u0e40\u0e27\u0e25\u0e32\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14\u0e43\u0e19\u0e40\u0e1e\u0e25\u0e07-\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e17\u0e35\u0e48\u0e40\u0e1e\u0e25\u0e07\u0e40\u0e25\u0e48\u0e19\u0e2d\u0e22\u0e39\u0e48\u00a0 \u0e0b\u0e36\u0e48\u0e07\u0e08\u0e30\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07\u0e44\u0e1b\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e22\u0e46\u0e02\u0e36\u0e49\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e01\u0e31\u0e1a\u0e27\u0e48\u0e32 \u0e15\u0e2d\u0e19\u0e19\u0e35\u0e49\u0e40\u0e1e\u0e25\u0e07\u0e01\u0e33\u0e25\u0e31\u0e07\u0e40\u0e25\u0e48\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e17\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35\u0e43\u0e14 \u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 computed properties \u0e40\u0e23\u0e32\u0e08\u0e30\u0e21\u0e35\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19 get\/set \u0e44\u0e27\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e04\u0e48\u0e32 \u0e41\u0e25\u0e30\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32\u0e43\u0e2b\u0e49\u0e01\u0e31\u0e1a properties \u0e19\u0e31\u0e49\u0e19 \u0e08\u0e30\u0e40\u0e2b\u0e47\u0e19\u0e27\u0e48\u0e32\u0e40\u0e23\u0e32\u0e21\u0e35\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19 get \u0e17\u0e35\u0e48\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2a\u0e48\u0e07\u0e04\u0e37\u0e19\u0e1c\u0e25\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13\u0e23\u0e30\u0e2b\u0e27\u0e48\u0e32\u0e07 \u0e40\u0e27\u0e25\u0e32\u0e17\u0e31\u0e49\u0e07\u0e2b\u0e21\u0e14 \u0e41\u0e25\u0e30 \u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19 \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e04\u0e48\u0e32 remainingTime \u0e41\u0e25\u0e30\u0e2b\u0e32\u0e01\u0e40\u0e23\u0e32\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32 remainingTime \u0e25\u0e07\u0e44\u0e1b\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e04\u0e33\u0e19\u0e27\u0e13\u0e04\u0e48\u0e32 currentTime \u0e43\u0e2b\u0e21\u0e48 \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 set \u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19 \u0e16\u0e49\u0e32\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e17\u0e33\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e0a\u0e37\u0e48\u0e2d\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e25\u0e07\u0e44\u0e1b\u0e43\u0e19 swift \u0e40\u0e2d\u0e07\u0e08\u0e30\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e0a\u0e37\u0e48\u0e2d\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34\u0e21\u0e32\u0e43\u0e2b\u0e49\u0e0a\u0e37\u0e2d\u0e27\u0e48\u0e32 newValue<\/p>\n<p><strong>Property Observer<\/strong><\/p>\n<p>property observer \u0e08\u0e30\u0e04\u0e2d\u0e22\u0e14\u0e31\u0e01\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e17\u0e35\u0e48\u0e08\u0e30\u0e01\u0e48\u0e2d\u0e19\u0e02\u0e36\u0e49\u0e19\u0e01\u0e31\u0e1a properties \u0e19\u0e31\u0e49\u0e19\u0e17\u0e31\u0e49\u0e07\u0e01\u0e48\u0e2d\u0e19\u0e41\u0e25\u0e30\u0e2b\u0e25\u0e31\u0e07\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07<\/p>\n<ul>\n<li>willSet \u0e08\u0e30\u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e48\u0e32\u0e08\u0e30\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07<\/li>\n<li>didSet \u0e08\u0e30\u0e16\u0e39\u0e01\u0e40\u0e23\u0e35\u0e22\u0e01\u0e2b\u0e25\u0e31\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07<\/li>\n<\/ul>\n<p><strong>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49<\/strong><\/p>\n<pre class=\"prettyprint lang-swift\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">struct TrackInfo{\r\n    var length:Int\r\n    var currentTime:Int {\r\n        \r\n        willSet(newValue) {\r\n            print(\"About to change currentTime \\(newValue)\")\r\n        }\r\n        didSet {\r\n            if currentTime &gt; oldValue  {\r\n                print(\"Time change \\(abs(currentTime - oldValue)) seconds\")\r\n            }\r\n        }\r\n    }\r\n    var remainingTime:Int{\r\n        get{\r\n            return length - currentTime\r\n        }\r\n        set(newValue){\r\n            currentTime = length - newValue\r\n        }\r\n    }\r\n}\r\n\r\nvar trackInfo = TrackInfo( length:90, currentTime:30)\r\ntrackInfo.currentTime = 50<\/pre>\n<p>\u0e08\u0e32\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e14\u0e31\u0e01\u0e08\u0e31\u0e1a\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e17\u0e35\u0e48\u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07\u0e04\u0e48\u0e32 currentTime \u0e40\u0e21\u0e37\u0e48\u0e2d\u0e01\u0e33\u0e25\u0e31\u0e07\u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07\u0e04\u0e48\u0e32\u0e40\u0e23\u0e32\u0e14\u0e31\u0e01\u0e08\u0e31\u0e1a\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 willSet \u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e08\u0e30\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e0a\u0e37\u0e48\u0e2d\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e08\u0e30\u0e23\u0e31\u0e1a\u0e04\u0e48\u0e32\u0e21\u0e32\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e44\u0e14\u0e49 \u0e41\u0e15\u0e48\u0e16\u0e49\u0e32\u0e2b\u0e32\u0e01\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e17\u0e33\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e0a\u0e37\u0e48\u0e2d\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 swift \u0e08\u0e30\u0e43\u0e0a\u0e49\u0e0a\u0e37\u0e48\u0e2d\u0e15\u0e31\u0e49\u0e07\u0e15\u0e49\u0e19\u0e04\u0e37\u0e2d newValue\u00a0 \u0e41\u0e25\u0e30\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e0b\u0e15\u0e04\u0e48\u0e32\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e23\u0e32\u0e08\u0e30\u0e14\u0e31\u0e01\u0e08\u0e31\u0e1a\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 didSet \u0e42\u0e14\u0e22\u0e08\u0e30\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e23\u0e35\u0e22\u0e01\u0e14\u0e39\u0e04\u0e48\u0e32\u0e40\u0e01\u0e48\u0e32\u0e01\u0e48\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e41\u0e1b\u0e25\u0e07\u0e04\u0e48\u0e32\u0e44\u0e14\u0e49\u0e1c\u0e48\u0e32\u0e19\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e0a\u0e37\u0e48\u0e2d oldValue<\/p>\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e02\u0e49\u0e32\u0e07\u0e15\u0e49\u0e19 \u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19\u0e43\u0e2b\u0e49 trackInfo \u0e42\u0e14\u0e22\u0e40\u0e1e\u0e25\u0e07\u0e21\u0e35\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27 90 \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 \u0e41\u0e25\u0e30\u0e40\u0e27\u0e25\u0e32\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e17\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35\u0e17\u0e35\u0e48 30 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e40\u0e23\u0e32\u0e21\u0e35\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32\u0e40\u0e27\u0e25\u0e32\u0e02\u0e2d\u0e07\u0e40\u0e1e\u0e25\u0e07\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e43\u0e2b\u0e49\u0e44\u0e1b\u0e2d\u0e22\u0e39\u0e48\u0e17\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35\u0e17\u0e35\u0e48 50<\/p>\n<p>\u0e1c\u0e25\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e14\u0e31\u0e01\u0e08\u0e31\u0e1a\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<pre class=\"prettyprint lang-swift\" data-start-line=\"1\" data-visibility=\"visible\" data-highlight=\"\" data-caption=\"\">About to change currentTime 40\r\nTime change 30 seconds<\/pre>\n<p>\u0e2d\u0e48\u0e32\u0e19\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21 <a href=\"https:\/\/developer.apple.com\/library\/ios\/documentation\/Swift\/Conceptual\/Swift_Programming_Language\/Properties.html#\/\/apple_ref\/doc\/uid\/TP40014097-CH14-ID254\">\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e23\u0e39\u0e49\u0e08\u0e31\u0e01\u0e01\u0e31\u0e1a properties properties \u0e04\u0e37\u0e2d\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e40\u0e01\u0e47\u0e1a\u0e41\u0e25\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e2a\u0e48\u0e27\u0e19\u0e2b\u0e19\u0e36\u0e48\u0e07 class, structure \u0e41\u0e25\u0e30 enumeration store properties \u0e04\u0e37\u0e2d \u0e04\u0e48\u0e32\u0e04\u0e07\u0e17\u0e35\u0e48 \u0e2b\u0e23\u0e37\u0e2d\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23\u0e17\u0e35\u0e48\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01 \u0e0b\u0e36\u0e48\u0e07\u0e08\u0e30\u0e2b\u0e32\u0e44\u0e14\u0e49\u0e43\u0e19 class, structure compute properties \u0e04\u0e37\u0e2d \u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e04\u0e33\u0e19\u0e27\u0e13\u0e02\u0e36\u0e49\u0e19 \u0e0b\u0e36\u0e48\u0e07\u0e08\u0e30\u0e2b\u0e32\u0e44\u0e14\u0e49\u0e43\u0e19 class, structure, enumeration store properties store properties \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e08\u0e30\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e40\u0e1b\u0e47\u0e19 \u0e04\u0e48\u0e32\u0e04\u0e07\u0e17\u0e35\u0e48(\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e14\u0e49\u0e27\u0e22 let) \u0e2b\u0e23\u0e37\u0e2d\u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 (\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28\u0e14\u0e49\u0e27\u0e22 var) \u0e01\u0e47\u0e44\u0e14\u0e49 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 store properties struct TrackInfo{ var length:Int var currentTime:Int } \u0e08\u0e32\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 \u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 Structure \u0e0a\u0e37\u0e48\u0e2d TrackInfo \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e44\u0e27\u0e49\u0e17\u0e33\u0e01\u0e32\u0e23\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07\u0e40\u0e1e\u0e25\u0e07\u0e41\u0e15\u0e48\u0e25\u0e30\u0e40\u0e1e\u0e25\u0e07 \u0e42\u0e14\u0e22\u0e40\u0e23\u0e32\u0e17\u0e33\u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28 \u0e15\u0e31\u0e27\u0e41\u0e1b\u0e23 properties \u0e0a\u0e37\u0e48\u0e2d\u0e27\u0e48\u0e32 <a href=\"https:\/\/www.booboohome.com\/blogs\/2016\/06\/ios-tutorial-begin-with-swift-day-8\/\" rel=\"nofollow\"><span class=\"sr-only\">Read more about iOS Tutorial &#8211; Begin with swift ( day 8 ) &#8211; Properties<\/span>[&hellip;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":1126,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[83,69,73,70],"class_list":["post-1217","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios-tutorial","tag-properties","tag-swift-","tag--swift"],"_links":{"self":[{"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/posts\/1217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/comments?post=1217"}],"version-history":[{"count":10,"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/posts\/1217\/revisions"}],"predecessor-version":[{"id":3574,"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/posts\/1217\/revisions\/3574"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/media\/1126"}],"wp:attachment":[{"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/media?parent=1217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/categories?post=1217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.booboohome.com\/blogs\/wp-json\/wp\/v2\/tags?post=1217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}