Ce document liste toutes les informations nécessaires afin de soumettre rapidement une application iOS sur iTunesConnect pour:
- Une nouvelle application
- Une mise à jour d'application
/* 1 - When your backend dev doesn't know how to REST*/ | |
let backEndLOL: [[String: String]] = [["Key":"CAPACITY","Value":"323"],["Key":"rate","Value":"3.00"]] | |
// Okay let's do his/her job | |
extension Collection where Iterator.Element == [String: String] { | |
var trueFuckingJson: [String: String] { | |
let tupleArray: [(String, String)] = self.map{ dict -> [String: String] in |
//: Playground - noun: a place where people can play | |
import UIKit | |
import Foundation | |
var str = "Hello, playground" | |
protocol JSONRepresentable { | |
var JSONRepresentation: AnyObject{ get } | |
} |
/* | |
In response of Tom Lokhort's article. | |
A third alternative: alternative 2 under steroïds | |
--- | |
Source: http://tom.lokhorst.eu/2017/07/strongly-typed-identifiers-in-swift | |
*/ | |
struct GenericIdentifier<T>: RawRepresentable, Hashable, Equatable { | |
let rawValue: String |
extension String { | |
func deleteOccurences(of: String) -> String { | |
return self.replacingOccurrences(of: of, with: "") | |
} | |
func deleteMarker() -> String { | |
let markerBRange = self.range(of: "<") |
extension UICollectionView { | |
public var rx_reachedBottom: Observable<Void> { | |
return self.rx.contentOffset | |
.map { contentOffset in | |
var responder: UIResponder = self | |
var viewController: UIViewController? = nil | |
while let next = responder.next { | |
viewController = next as? UIViewController | |
if viewController != nil { |
// | |
// FontConfiguration.swift | |
// juliengdt | |
// | |
// Created by Julien Goudet on 26/09/2016. | |
// Based on: https://www.iphonelife.com/blog/31369/swift-programming-101-mastering-dynamic-type-ios | |
// | |
import Foundation |
extension Alamofire.Request { | |
func responseDebugPrint() -> Self { | |
return responseJSON() { | |
response in | |
if let JSON: AnyObject = response.result.value, | |
JSONData = try? NSJSONSerialization.dataWithJSONObject(JSON, options: .PrettyPrinted), | |
prettyString = NSString(data: JSONData, encoding: NSUTF8StringEncoding) { | |
print(prettyString) | |
} else if let error = response.result.error { | |
print("Error Debug Print: \(error.localizedDescription)") |
#import <UIKit/UIKit.h> | |
#ifndef __IPHONE_7_0 | |
#error Because of Dynamic Kit, this custom flowLayout requires APIs only available in iOS SDK 7.0 and later | |
#endif | |
/** | |
* A UICollectionViewFlowLayout subclass that, when implemented, | |
* creates a dynamic / elastic scroll effect for UICollectionViews | |
*/ |
- (void)boldSubText | |
{ | |
NSString *textToAttribute = @"abcdefg*-hijklm-*nopqrst*-uvwxyz-*"; | |
NSDictionary *boldAttributeDict = @{NSFontAttributeName: | |
[UIFont robotoBoldFontOfSize:MODAL_INFORMATION_FONT_SIZE_DESCRIPTION]}; | |
NSArray<NSString *> *splittedSubText = [textToAttribute componentsSeparatedByString:@"*"]; | |
NSMutableArray<NSAttributedString*> *splittedAttributedStringArray = [[NSMutableArray alloc] initWithCapacity:splittedSubText.count]; | |
[splittedSubText enumerateObjectsUsingBlock:^(NSString *_Nonnull splittedString, NSUInteger idx, BOOL *_Nonnull stop) { |