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
- (IBAction)updateAction { | |
NSURLRequest* requestForWeatherData = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://api.openweathermap.org/data/2.5/weather?q=London,UK&APPID=????????????"]]; | |
//NOTE : ???? is here -> openweathermap api key write | |
NSURLSession *session = [NSURLSession sharedSession]; | |
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:requestForWeatherData completionHandler:^(NSData * data, NSURLResponse * response, NSError * error) { | |
NSMutableDictionary *allData = [ NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error]; | |
NSLog(@"%@ - Error %@", allData,error); | |
//data in serialized view |
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
func getDateAndTime() -> (String,String) { | |
let formatterDate = DateFormatter() | |
let formatterTime = DateFormatter() | |
formatterDate.dateFormat = "dd/MM/yyyy" | |
formatterTime.dateFormat = "HH:mm" | |
let currentDate = Date() | |
let date = formatterDate.string(from:currentDate) |
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
class Person { | |
private var _name : String? = "" | |
private var _surName : String? = "" | |
var name : String?{ | |
get { | |
return _name?.uppercased() | |
} |
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
#import <UIKit/UIKit.h> | |
@class A_ContainerVC; | |
@protocol A_ContainerVCDelegate <NSObject> | |
-(void)sendValue:(NSString *)Name; | |
@optional |
NewerOlder