This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Presenter = { | |
| // 1 | |
| makeDocument: function(resource) { | |
| if (!Presenter.parser) { | |
| Presenter.parser = new DOMParser(); | |
| } | |
| var doc = Presenter.parser.parseFromString(resource, "application/xml"); | |
| return doc; | |
| }, | |
| // 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // AppDelegate.swift | |
| // MyFirstTVML | |
| // | |
| // Copyright (c) 2016年 夏洛克. All rights reserved. | |
| // | |
| import UIKit | |
| import TVMLKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| App.onLaunch = function(options) { | |
| var alert = createAlert("Hello Sherlock's 2 World!", "Welcome to tvOS"); | |
| navigationDocument.pushDocument(alert); | |
| } | |
| App.onWillResignActive = function() { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleDevelopmentRegion</key> | |
| <string>en</string> | |
| <key>CFBundleExecutable</key> | |
| <string>$(EXECUTABLE_NAME)</string> | |
| <key>CFBundleIdentifier</key> | |
| <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <key>NSAppTransportSecurity</key> | |
| <dict> | |
| <key>NSAllowsArbitraryLoads</key> | |
| <true/> | |
| </dict> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # deviceType can be either "phone" or "desktop" | |
| Framer.DeviceView.Devices["custom"] = | |
| "deviceType": "tv" | |
| "screenWidth": 1280 | |
| "screenHeight": 720 | |
| "deviceImage": "https://farm6.staticflickr.com/5671/23440590563_40d221e65e_o.jpg" | |
| "deviceImageWidth": 1380 | |
| "deviceImageHeight": 849 | |
| # Set custom device | |
| Framer.Device.deviceType = "custom" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Prototyping with Framer | |
| # by Kenny Chen | |
| # Module Exercise | |
| # Set Background | |
| new BackgroundLayer | |
| backgroundColor: "#52BDFF" | |
| signIn = new Layer | |
| width:696, height:428, image:"images/hello.png" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exports.addPlaceit = (layer, text = "", bgColor = "#999999", fontColor = "#ffffff") -> | |
| width = layer.width | |
| height = layer.height | |
| bgColor = bgColor.replace "#", "" | |
| fontColor = fontColor.replace "#", "" | |
| if text | |
| text = "&text=#{text}: #{width}x#{height}" | |
| layer.image = "http://placehold.it/#{width}x#{height}/#{bgColor}/#{fontColor}/#{text}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testlayer=new Layer | |
| width: Screen.width | |
| height: Screen.height/2 | |
| addPlaceit = (layer, text = "", bgColor = "#999999", fontColor = "#ffffff") -> | |
| width = layer.width | |
| height = layer.height | |
| bgColor = bgColor.replace "#", "" | |
| fontColor = fontColor.replace "#", "" | |
| if text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Prototyping with Framer | |
| # by Kenny Chen | |
| # Components Exercise Solution | |
| # Import patternA.png, patternB.png, patternC.png | |
| # in your /images/exercise/ folder | |
| patternA = new Layer | |
| x:0, y:0, width:750, height:550, image:"images/patternA.png" | |
| patternB = new Layer | |
| x:0, y:0, width:750, height:550, image:"images/patternB.jpg" |