WhichFont 1.0.1 with iPhone support
https://github.com/gali8/WhichFont
WhichFont 1.0.1 is ready. Now with iPhone support (and tesseract bug fixed).
Enjoy
occasionally subtle

JVL
art blog(derogatory)
KIROKAZE

Kiana Khansmith

Kaledo Art
Peter Solarz
almost home
Keni

No title available
styofa doing anything
Alisa U Zemlji Chuda

★
i don't do bad sauce passes
Claire Keane
DEAR READER
NASA

titsay
Show & Tell
Today's Document
seen from Netherlands
seen from United States

seen from Türkiye
seen from Kuwait

seen from United States
seen from United States

seen from United States
seen from Indonesia
seen from United States
seen from Netherlands

seen from India

seen from Malaysia

seen from Türkiye
seen from United States
seen from United States
seen from Italy

seen from Singapore

seen from United States
seen from United States

seen from United States
@g8production
WhichFont 1.0.1 with iPhone support
https://github.com/gali8/WhichFont
WhichFont 1.0.1 is ready. Now with iPhone support (and tesseract bug fixed).
Enjoy
How to learn machine learning
With iOS11 Apple will introduce Core ML. With Core ML, you can integrate trained machine learning models into your app. So, the first step before to understand models, Caffe, Keras, Core ML etc... is try to learn machine learning.
Machine learning is not so easy to understand but you can get a world-class machine learning education for free following the nice tutorial powered by EliteDataScience, at https://elitedatascience.com/learn-machine-learning
WhichFont: iOS11 app demo with Vision (VNTextObservation) and Tesseract-OCR-iOS
WhichFont is my new demo app.
Using Vision (VNTextObservation) and Tesseract-OCR-iOS, you can recognize texts on live.
Features:
Swift 4
iOS 11
Vision
Tesseract OCR iOS
Get it from_ here.
If you like my work please buy me a beer!
dyld`__abort_with_payload: iOS10 crash
In iOS10 there are more privacy rules than before. Use libraries like CMPedometer, MPMusicPlayerController, etc.. produce the error dyld`__abort_with_payload: when you run the app in the iOS10 device.
That’s happen because you need to update your Info.plist file with the right key/value rule (do you remember the GPS always/when in use authorization?). Below the list:
<!-- 🖼 Photo Library --> <key>NSPhotoLibraryUsageDescription</key> <string><Your description goes here></string> <!-- 📷 Camera --> <key>NSCameraUsageDescription</key> <string><Your description goes here></string> <!-- 🎤 Microphone --> <key>NSMicrophoneUsageDescription</key> <string><Your description goes here></string> <!-- 📍 Location When In Use --> <key>NSLocationWhenInUseUsageDescription</key> <string><Your description goes here></string> <!-- 📍 Location Always --> <key>NSLocationAlwaysUsageDescription</key> <string><Your description goes here></string> <!-- 📆 Calendars --> <key>NSCalendarsUsageDescription</key> <string><Your description goes here></string> <!-- ⏰ Reminders --> <key>NSRemindersUsageDescription</key> <string><Your description goes here></string> <!-- 🏊 Motion --> <key>NSMotionUsageDescription</key> <string><Your description goes here></string> <!-- 💊 Health Update --> <key>NSHealthUpdateUsageDescription</key> <string><Your description goes here></string> <!-- 💊 Health Share --> <key>NSHealthShareUsageDescription</key> <string><Your description goes here></string> <!-- ᛒ🔵 Bluetooth Peripheral --> <key>NSBluetoothPeripheralUsageDescription</key> <string><Your description goes here></string> <!-- 🎵 Media Library --> <key>NSAppleMusicUsageDescription</key> <string><Your description goes here></string>
Don’t forget to localize every description in the others localized Info.plist files.
One more: If there is the message “dyld: Library not loaded:..” in the console this means that you need to put your custom external frameworks inside the Embedded Binaries section located in the Xcode project under the tab Target/General.
G8SliderStep, custom slider in Swift
G8SliderStep 1.0 is available on GitHub.
It’s a custom range UISlider for iOS, written in Swift - Draggable, Tappable, @IBInspectable
Features:
Ready to use
Easy customization (font, colors, images, ticks...)
@IBInspectable
Tappable
Draggable
Titles support
Rotation support
Swift 2 support
iOS8+ support
Get it from here.
If you like my work please buy me a beer!
Lazy Initialization with Swift
Lazy initialization (also sometimes called lazy instantiation, or lazy loading) is a technique for delaying the creation of an object or some other expensive process until it’s needed. When programming for iOS, this is helpful to make sure you utilize only the memory you need when you need it.
This is a really short example.
lazy var players = [String]()
So, forget the old style syntax:
@property (nonatomic, strong) NSMutableArray *players; - (NSMutableArray *)players { if (!_players) { _players = [[NSMutableArray alloc] init]; } return _players; }
Continue to read on MikeBuss website.
Swift 3 first preview
Apple yesterday released the first preview build of Swift 3.0, a major update to Apple's open source Swift programming language. Look at the implemented proposals for Swift 3: https://github.com/apple/swift-evolution/blob/master/README.md
Documenting Your Swift Code in Xcode Using Markdown
Documenting the code is an extremely important task for every developer. Even though it seems that it stalls the development process, it’s actually a part of it. I won’t disagree that writing proper and comprehensive documentation for every single property, function, class, struct, or anything else that exists in a project is not an easy job.
Continue to... http://www.appcoda.com/swift-markdown/
G8MaterialKitTextField with country code
G8MaterialKitTextField 2.1, with country code selector, is online!
Inspired to MKTextField and CCCountrySelector, is under MIT license. Full IBInspectable, Swift 2 ready, completely customizable.
Download it from Github => https://github.com/gali8/G8MaterialKitTextField
Missing iOS Distribution and Apple WWDR Certificate
Today there is a big issue with XCode and Apple certificates.
If you try to submit an iOS App to the Store, you will receive an error like at the image below.
The issue is because the Apple Intermediate Certificate (Apple WWDR CA) is expired yesterday, 14 February 2016, on Saint Valentine. https://developer.apple.com/support/certificates/expiration/
So, there are 3 solutions at the moment. 1- Update the system date to 13 February 2016. (IT’S WORKING FOR ME)
or
2- Open Keychain Access, and in the menu, click View -> Show Expired Certificates. Then, delete the expired Apple Worldwide Developer Relations Certificate Authority from both the login and System Keychains. Install the renewed certificate from Apple by downloading from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and then opening it.
or
3- Follow the steps 1 and 2; only later change the system date to the current date.
Tuples in Swift 2
Tuples A tuple is a group of zero or more values represented as one value.
For example ("John", "Smith") holds the first and last name of a person. You can access the inner values using the “.” notation followed by the index of the value or you can name the elements from a tuple and use those names to refer to them. An element name is an identifier followed by a colon “:”
var person = (firstName: "John", lastName: "Smith") var firstName = person.firstName // John var lastName = person.lastName // Smith
Don’t forget that a function can return a tuple.
Here a nice post from “We ❤ Swift” about tuples.
From Natasha With Love
Directly from the newsletter “this week in Swift” (by https://www.natashatherobot.com), a nice TechCrunch’s post from the co-founder of Cluster:
The Right Way To Ask Users For iOS Permissions
Install CocoaPods on El Capitan OS X 10.11
Do you want to install CocoaPods on El Capitan OS X 10.11? Try this:
sudo gem install -n /usr/local/bin cocoapods
tvOS initial Impressions
Yet another great post from Ray Wenderlich about the new Apple Tv and tvOS SDK: XML/Javascript or UIKit. Happy reading. http://www.raywenderlich.com/114313/tvos-initial-impressions
How to dynamically change the height of statics UITableViewCell
Today... after a long vacation :) I will explain how to - dynamically - update the height of statics UITableViewCell. In Swift. I suppose that you are in a viewcontroller that inherits from the UITableViewController and that you are ready to use the tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) function.
Write your code there like below:
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { let dynamicRowIndexPath = NSIndexPath(forRow: 2, inSection: 0) if !indexPath.isEqual(dynamicRowIndexPath) { return super.tableView(tableView, heightForRowAtIndexPath: indexPath) } else { return iWannaBigCell == true ? 250 : 80 } }
and where the new height for the cell is required, just write these two lines:
self.tableView.beginUpdates() self.tableView.endUpdates()
That’s all!
Swift: split array with map stride advance
Do you want to split an array in consecutive or NOT consecutive sequence? With Swift this will be easy but a bit complicate to understand. Anyway, below the code for split your array using map, stride and advance:
let tempDataSource = ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"] let sections = 4 //split array in multiple arrays with NOT consecutive sequence let a = map(stride(from:0 , to: sections, by: 1)) { map(stride(from:$0 , to: tempDataSource.count, by: sections)) { tempDataSource[$0] } } println(a[0]) let offset = tempDataSource.count%sections > 0 ? 1: 0 let split = (Int)(tempDataSource.count/sections) + offset var b: [ArraySlice<String>] = [] //split array in multiple arrays with consecutive sequence b = map(stride(from:0 , to: tempDataSource.count, by: split)) { tempDataSource[$0..<advance($0, split, tempDataSource.count)] } println(b[0])
Quick help (standard documentation) in Swift
Have you need to add standard documentation to your Swift code? Have you need to write a readable “Quick help” in Swift? Have you need to add comments to your Swift function?
That’s easy!
You can create a basic text comment observing this format :key:
/** My Function is a stupid function written in Swift (1.2) :param: param1 is a String param :param: param2 is a Int param :param: closure wow there is a closure! :returns: Always 2.0 :thisisacustomtext: Wow! 😃 availability iOS 8.3 */ class func myFunction(param1: String, param2: Int, closure: (Bool) -> Void) -> Float { println("This is a stupid func") return 2.0 }
Enjoy!