This file contains 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 MyCustomView: UIView { | |
private var didSetupConstraints = false | |
//In Swift initializers are not inherited for subclasses by default | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
} | |
// Deserialize your object here |
This file contains 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
final class MyCell: UITableViewCell { | |
final let myCustomView: UIView | |
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | |
self.myCustomView = UIView() | |
super.init(style: style, reuseIdentifier: reuseIdentifier) | |
self.contentView.addSubview(self.myCustomView) | |
self.initializeBasicElements() | |
} |
This file contains 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
https://medium.com/@marcosantadev/app-localization-tips-with-swift-4e9b2d9672c9 | |
1. Add localization language on Project | |
2. Add a string File "Localizable" (or many string files for better organization ex: "SpecificCategoryTableName" ) | |
3. add following code | |
extension String { | |
func localized(bundle: Bundle = .main, tableName: String = "Localizable") -> String { | |
return NSLocalizedString(self, tableName: tableName, value: "**\(self)**", comment: "") | |
} | |
} |
This file contains 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
Enviromental Arguments | |
- DYLD_PRINT_STATISTICS = true( shows Slow App Startup Times) | |
- OS_ACTIVITY_MODE = disable (turn off default OS logging) |
This file contains 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
Personal rejections | |
MetaData | |
- Iphone X picture in iphone 5 slots | |
User Data | |
- Get personal user data without explain where are you going to use them | |
- |
This file contains 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
const functions = require('firebase-functions'); | |
const admin = require("firebase-admin"); | |
admin.initializeApp(); | |
exports.notifyNewMessage = functions.firestore | |
.document('365BetaCannels2/{chanl}/thrad/{messe}') | |
.onCreate((docSnapshot, context) => { | |
const message = docSnapshot.data(); | |
const recipientId = message['recipientID']; |
This file contains 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
// | |
// Created by はるふ on 2017/12/11. | |
// Copyright © 2017年 ha1f. All rights reserved. | |
// | |
import Foundation | |
import CoreImage | |
import AVFoundation | |
extension CIFilter { |
This file contains 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
@objc class JPTiltShiftGenerator: NSObject, CIFilterConstructor { | |
@objc func filterWithName(name: String)->CIFilter? { | |
return JPTiltShift() | |
} | |
} | |
class JPTiltShift : CIFilter { | |
class func register() { |
This file contains 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
// | |
// Created by はるふ on 2017/12/11. | |
// Copyright © 2017年 ha1f. All rights reserved. | |
// | |
import Foundation | |
import CoreImage | |
import AVFoundation | |
extension CIFilter { |
OlderNewer