This file contains 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
struct Objcio: View { | |
var book: String | |
var body: some View { | |
Text(book) | |
} | |
} | |
var objcio = Objcio(book: "Advanced Swift") | |
objcio.book = "App Architecture" |
This file contains 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
{ | |
"teams": [ | |
{ | |
"id": 1, | |
"name": "Russia", | |
"fifaCode": "RUS", | |
"iso2": "ru", | |
"flag": "https://upload.wikimedia.org/wikipedia/en/thumb/f/f3/Flag_of_Russia.svg/900px-Flag_of_Russia.png", | |
"emoji": "flag-ru", | |
"emojiString": "🇷🇺" |
This file contains 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
func getTwitterData() { | |
let urlString = "http://***.com/twitter.php?tag=mef" | |
let request = NSURLRequest(URL: NSURL(string:urlString)!) | |
NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) { (response, data, error) -> Void in | |
let json = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.allZeros, error: nil) as [String:AnyObject] | |
println(json) | |
self.textLabel.text = "Twitler Geldi" | |
self.textList = json["statuses"] as [AnyObject] | |
} |