Skip to content

Instantly share code, notes, and snippets.

View kostapappas's full-sized avatar

LAMPROS KOSTAPAPPAS kostapappas

View GitHub Profile
@kostapappas
kostapappas / Apple rejections reasons
Created December 12, 2018 08:36
Apple rejections reasons
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
-
@kostapappas
kostapappas / scheme improvements.swift
Last active October 2, 2018 13:06
scheme improvements.swift
Enviromental Arguments
- DYLD_PRINT_STATISTICS = true( shows Slow App Startup Times)
- OS_ACTIVITY_MODE = disable (turn off default OS logging)
@kostapappas
kostapappas / Localization techniques.swift
Last active October 2, 2018 12:25
Localization techniques
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: "")
}
}
@kostapappas
kostapappas / customUITableViewCell.swift
Last active November 5, 2018 17:58
custom UITableViewCell
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()
}
@kostapappas
kostapappas / customView.swift
Last active November 20, 2021 05:16
Swift 4, custom UIView with explanations
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