HomeЮморRelated VideosMore From: Mitchell Hudson

13 Weather App Xcode 7 Add new property cloudiness

10 ratings | 1814 views
Xcode 7 Swift Weather app. Review adding properties from Openweathermap as they will be processed and displayed in the App.
Category: Юмор
Html code for embedding videos on your blog
Text Comments (8)
milos mandic (2 years ago)
Hello Mitch, I have one more question, how to create date property and fill it from JSON? Thanks
Mitchell Hudson (2 years ago)
Open weather map provides the date as the key: dt. It's a timestamp you can convert this to an NSDate something like this: var date = NSDate(timeIntervalSince1970: timeInterval) From here create a NSDateFormatter to format your date into something readable. https://www.google.com/?gws_rd=ssl#safe=off&q=swift+nsdate+from+timestamp
Chris Nijland (3 years ago)
Mitchell you are the best!!!!!Thanks for the tutorials they are so good.
Mitchell Hudson (3 years ago)
+Chris Nijland Thanks Im just happy I could help you out.
ActifProduction (3 years ago)
Thank you Mitchell for this wonderful tutorial, I was wondering if we can show the description label in another language! and what about the conversion of temp to celsius format. Thanks again
Mitchell Hudson (3 years ago)
+AvtifProduction You can make this in any language. Xcode and iOS has a system built in to handle different languages. Look up Xcode iOS localization: xcode localization tutorial I have a couple versions of weather app here. Look for the most recent one. There is a file named Weather.swift. This is a struct that defines some calculated properties that provide the temperature in F and C: https://github.com/search?q=user%3Asoggybag+weather Here is a link to a gist: https://gist.github.com/soggybag/001a1cd8da3d8b8dc7f7 Here is a snippet var tempC: Double { get { return temp - 273.15 } } var tempF: Double { get { return tempC * 9/5 + 32 } }
Mitchell Hudson (3 years ago)
I had the idea I might do something to send the weather via SMS or email. Possibly take an image and set it as the background.
Tirta Wijaya (3 years ago)
Thanks. Appreciate the tutorial. Will this be the last one for the Weather App ?

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.