Oh, I so adore articles dedicated to the scroll optimization and this one isn't an exception. Even though this article was written in the distance 2015, there are a lot of techniques that are still actual nowadays. Especially I like the tip about Subpixel Rendering.
p.s. Don't be afraid of Objective-С.
https://medium.com/ios-os-x-development/perfect-smooth-scrolling-in-uitableviews-fd609d5275a5
#iOS #performance
p.s. Don't be afraid of Objective-С.
https://medium.com/ios-os-x-development/perfect-smooth-scrolling-in-uitableviews-fd609d5275a5
#iOS #performance
Medium
Perfect smooth scrolling in UITableViews
Story about optimizations for reaching 60 FPS in iOS most frequently used building block
Imagine a registration flow with a few steps (screens) and each of them fils some information about a user. Finally, you have to construct the user by the data from the previous steps... how?
There're many solutions to achieve it - using optional properties and just pass an object over the screens; maybe create a dictionary with filed data and so on.
But I really adore this solution by utilizing KeyPath's, Generics and subscripts to create a partial object. Of course, in no way without downsides, but they're so minor and it doesn't prevent to use it!
p.s. Recently I already posted the similar article, but this one looks really great with more details about a realization.
https://josephduffy.co.uk/partial-in-swift
There're many solutions to achieve it - using optional properties and just pass an object over the screens; maybe create a dictionary with filed data and so on.
But I really adore this solution by utilizing KeyPath's, Generics and subscripts to create a partial object. Of course, in no way without downsides, but they're so minor and it doesn't prevent to use it!
p.s. Recently I already posted the similar article, but this one looks really great with more details about a realization.
https://josephduffy.co.uk/partial-in-swift
In the near future, we can stop using % operator for checking if a number is odd or even and start utilizing a new proposed function - isMultiple(of:).
https://forums.swift.org/t/accepted-with-modifications-se-0225-adding-iseven-isodd-ismultiple-to-binaryinteger/15689
and a bit of optimization of is-multiple checks with the weird trick:
http://duriansoftware.com/joe/Optimizing-is-multiple-checks-with-modular-arithmetic.html
https://forums.swift.org/t/accepted-with-modifications-se-0225-adding-iseven-isodd-ismultiple-to-binaryinteger/15689
and a bit of optimization of is-multiple checks with the weird trick:
http://duriansoftware.com/joe/Optimizing-is-multiple-checks-with-modular-arithmetic.html
Swift Forums
[Accepted with Modifications] SE-0225: Adding isMultiple to BinaryInteger
Review thread | Proposal This proposal prompted a lot of very interesting discussion. Many members of the community favor adding these methods, but others are concerned about opening the door to a large number of trivial additions. Adding many trivial…
A bit of undocumented Swift feature. Have you known, that you can set a default type for associatedtype?
associatedtype A: Foo
associatedtype B = Foo // default
https://swiftrocks.com/swift-associated-types-with-default-values.html
#swift
associatedtype A: Foo
associatedtype B = Foo // default
https://swiftrocks.com/swift-associated-types-with-default-values.html
#swift
Swiftrocks
Swift Associated Types With Default Values
I was browsing the Swift forums when I stumbled across a discussion regarding an undocumented feature of Swift (as of this post's date): the ability to give associated types a default value.
Mattt's decided to trawl through the API diffs from iOS 11.4 to 12, thus posted a new NSHipster article describing what's new here.
https://nshipster.com/ios-12/
#iOS12
https://nshipster.com/ios-12/
#iOS12
NSHipster
iOS 12
Here at NSHipster, we’re interested in the nitty-gritty: the small (dare we say, obscure?) changes that add up to make a big impact to our day-to-day. In celebration of this week’s release of iOS 12, we’re sharing a few gems we found by trawling through API…
https://numerics.diploid.ca/
Notes on numerics in Swift
Notes on numerics in Swift
I completely forgot about new logging system that works since the iOS 10, but then I noticed this article that describes this system with some thoughts on why we'd want to use it. So I think we have to try to stop using NSLog and print statements, as well as some kind of logging libs such as CocoaLumberjack.
https://www.bignerdranch.com/blog/migrating-to-unified-logging-swift-edition/
https://www.bignerdranch.com/blog/migrating-to-unified-logging-swift-edition/
Big Nerd Ranch
Migrating to Unified Logging, Swift Edition - Big Nerd Ranch
Check out our blog post Migrating to Unified Logging, Swift Edition from Big Nerd Ranch. Learn more and read it now!
It's the most popular question since the release of Xcode 10 - ”Where's the Library?”.
So this article describes some tips on how to simplify the process of working with new library popup.
The most useful tip is you need to hold the Option (⌥) key to keep the popup visible until you close it yourself.
https://useyourloaf.com/blog/xcode-10-library-tips/
So this article describes some tips on how to simplify the process of working with new library popup.
The most useful tip is you need to hold the Option (⌥) key to keep the popup visible until you close it yourself.
https://useyourloaf.com/blog/xcode-10-library-tips/
A bit of array performance - need to be aware when it's preferable to use reserveCapacity rather than a simple array allocation. Be familiar with the Big-O notation! 😉
https://www.hackingwithswift.com/articles/128/array-performance-append-vs-reservecapacity
#swift #performance
https://www.hackingwithswift.com/articles/128/array-performance-append-vs-reservecapacity
#swift #performance
Hacking with Swift
Array performance: append() vs reserveCapacity()
Sometimes its faster to let Swift figure things out for you
A step by step guide how to build an iOS app without Xcode's Build System. Why lol?
https://vojtastavik.com/2018/10/15/building-ios-app-without-xcode/
#iOS
https://vojtastavik.com/2018/10/15/building-ios-app-without-xcode/
#iOS
https://www.wtfautolayout.com/ 오토레이아웃이 깨지거나, 콘솔에 뜨는 로그를 넣으면 왜 깨지는지 알려 줍니다.
WTF Auto Layout?
Make sense of cryptic Auto Layout error logs.
There's an awesome tool I've found.
”It injects itself into the iOS Simulator so that it can monitor views and adjust them in real time.”
https://www.hackingwithswift.com/articles/131/sherlock-turbocharges-your-ios-simulator
#iOS #simulator
”It injects itself into the iOS Simulator so that it can monitor views and adjust them in real time.”
https://www.hackingwithswift.com/articles/131/sherlock-turbocharges-your-ios-simulator
#iOS #simulator
Hacking with Swift
Sherlock turbocharges your iOS simulator
Inspect and adjust any app in real time
There's a new hype post about snapshot testing on Twitter provided by guys from the Point Free. Many fellows liked it and highly recommend to try it out, so I can't miss to share it with you.
https://www.pointfree.co/blog/posts/23-snapshottesting-1-0-delightful-swift-snapshot-testing
#iOS #swift #Tests #snapshot_testing
https://www.pointfree.co/blog/posts/23-snapshottesting-1-0-delightful-swift-snapshot-testing
#iOS #swift #Tests #snapshot_testing
www.pointfree.co
SnapshotTesting 1.0: Delightful Swift snapshot testing
Today we are open sourcing SnapshotTesting 1.0: a modern, composable snapshot testing library built entirely in Swift!