https://habrahabr.ru/post/129557/
UIViewController согласно шаблону проектирования MVC обеспечивает взаимосвязь
| import datetime | |
| # pip install requests PyJWT cryptography | |
| import jwt | |
| import requests | |
| # https://developer.apple.com/account/resources/identifiers/list/serviceId | |
| WEATHERKIT_SERVICE_ID = "" # Create service like (use same ending): com.example.weatherkit-client | |
| # https://developer.apple.com/account/ - click Membership in nav to get Team ID |
| import Foundation | |
| // Inspired by https://gist.github.com/mbuchetics/c9bc6c22033014aa0c550d3b4324411a | |
| struct JSONCodingKeys: CodingKey { | |
| var stringValue: String | |
| init?(stringValue: String) { | |
| self.stringValue = stringValue | |
| } |
| // Custom Date Decoding | |
| jsonDecoder.dateDecodingStrategy = .custom({ (decoder) -> Date in | |
| let data = try decoder.singleValueContainer().decode(String.self) | |
| //perform your operation on obtained string | |
| let disturbance = "01-07-1977" | |
| let formatter = DateFormatter() | |
| formatter.dateFormat = "dd-MM-yyyy" | |
| if data == "First disturbance in force" { | |
| return formatter.date(from: disturbance) ?? Date() | |
| } else { |
https://habrahabr.ru/post/129557/
UIViewController согласно шаблону проектирования MVC обеспечивает взаимосвязь
| #!/bin/sh | |
| UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
| # make sure the output directory exists | |
| mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" | |
| # Step 1. Build Device and Simulator versions | |
| xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build | |
| xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build |
| locale_id | time | formatted | |
|---|---|---|---|
| en_IE | 00:00 | 11 Jul 2013 00:00:00 Pacific Daylight Time | |
| en_IE | 00:01 | 11 Jul 2013 01:00:00 Pacific Daylight Time | |
| en_IE | 12:00 | 11 Jul 2013 12:00:00 Pacific Daylight Time | |
| en_IE | 12:01 | 11 Jul 2013 13:00:00 Pacific Daylight Time | |
| ro_MD | 00:00 | 11.07.2013, 00:00:00 Ora de vară în zona Pacific | |
| ro_MD | 00:01 | 11.07.2013, 01:00:00 Ora de vară în zona Pacific | |
| ro_MD | 12:00 | 11.07.2013, 12:00:00 Ora de vară în zona Pacific | |
| ro_MD | 12:01 | 11.07.2013, 13:00:00 Ora de vară în zona Pacific | |
| br | 00:00 | 2013 Goue 11 00:00:00 GMT-07:00 |
| UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"something"] applicationActivities:nil]; | |
| self.popover = [[UIPopoverController alloc] initWithContentViewController:activityViewController]; | |
| self.popover.delegate = self; | |
| [self.popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; |