Skip to content

Instantly share code, notes, and snippets.

View ahmetws's full-sized avatar

Ahmet Yalcinkaya ahmetws

View GitHub Profile
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]
}
@ahmetws
ahmetws / worldcup2018-teams.json
Created May 21, 2018 13:28
world cup 2018 teams
{
"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": "🇷🇺"
@ahmetws
ahmetws / SwiftUIPlayground-code.swift
Last active June 5, 2019 18:33
How to use SwiftUI inside Playground
struct Objcio: View {
var book: String
var body: some View {
Text(book)
}
}
var objcio = Objcio(book: "Advanced Swift")
objcio.book = "App Architecture"