Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AutoLayout & Adaptive Layout

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa
Mac Cocoa  
Author Message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Nov 13, 2015 10:48 pm    Post subject: AutoLayout & Adaptive Layout Reply with quote

so - xCode 6 beta 7: storyboard adds extra space on right and left sides

"iOS 8 adds the concept of 'content margins' to UIView. The "Whats New
in Cocoa Touch" video from WWDC 2014 discusses content margins (under
the title Adaptive Margins) starting at about 12m30s.

The default margins are 8 points on each side. Each end of a layout constraint
can be relative to a view's margin instead of to the view's true edge

(use File > Open Quickly to go to the definition of NSLayoutAttribute to see the
possibilities)."


Last edited by delovski on Wed Aug 02, 2017 4:22 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Nov 14, 2015 8:47 pm    Post subject: Reply with quote

flaviocaetano - Autolayout Is Hell on Earth

"After spending a few hours trying to find the root of the problem with a
couple of friends (we even considered the problem being the SDK's dequeue
thanks to Profiler) some inspired insight hit us and we decided to disable
autolayout on the UICollectionViewCell's xib and everything flowed like a
beautiful stream under the morning sunlight of tropical woods."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Nov 16, 2015 10:40 pm    Post subject: Reply with quote

so - Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0

"Once you find the label the solution that worked for me was to set the 'preferred width' to 0."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Apr 10, 2017 11:28 am    Post subject: Reply with quote

digitalleaves.com - The Ultimate Guide to Autolayout

"This is a series of tutorials to help you become an AutoLayout expert. In
the first episode, we will start by mastering the basics. AutoLayout is a set
of rules that dictate how the visual elements of an iOS App display on iOS
devices. "


second part - The Ultimate Guide to iOS AutoLayout (2)

"To illustrate the problem with absolute offsets and sizes, we will use a
sample app that mimics a social network profile for a user. Maybe the
designer in our team gives us some initial designs, depicting how the
application looks in an iPhone 7Plus."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Apr 26, 2017 4:46 pm    Post subject: Reply with quote

r - Making interfaces using Interface Builder vs. fully programmatically

"I used to only code interfaces programmatically, but then I started before IB
was a thing. It was hard to switch. But I feel with all the varying screen sizes
now, you just have to use IB and auto layout if you are building apps to run on
all devices. Especially with the split screens in the new iPads. It's just too much
hassle anymore to do it in code."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu Apr 27, 2017 7:21 pm    Post subject: Reply with quote

r - iOS tutorials for building apps without storyboard

"App Without Storyboard

This is just the steps to delete the story board and make your app run. After
that I use the Cartography framework to layout my screens."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Aug 02, 2017 4:22 pm    Post subject: Reply with quote

rw - Adaptive Layout Tutorial in iOS 11: Getting Started

"The introduction of Adaptive Layout caused a huge paradigm shift for iOS app
designers. When designing your app, you can now create a single layout, which
works on all current iOS devices - without crufty platform-specific code!"
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Fri Dec 01, 2017 11:37 pm    Post subject: Reply with quote

rw - Development Tutorial for iPhone X

"If you're new to auto layout, or just need to brush up, check out our tutorial
and video course:

Auto Layout Tutorial in iOS 11: Getting Started: Updated to iOS 11, Xcode 9
and Swift 4, but pre-iPhone X-announcement.

Beginning Auto Layout video course: At the time of writing this tutorial, this
video course was up-to-date for iOS 10, Xcode 8 and Swift 3.

Adaptive Layout Tutorial in iOS 11: Getting Started: Updated to iOS 11, Xcode
9 and Swift 4, but pre-iPhone X-announcement. Create a single layout that
works on all iOS devices, without platform-specific code. Adaptive layout will
also look good on future devices that haven't even been released yet."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Wed Jan 24, 2018 7:31 am    Post subject: Reply with quote

Autoresizing Masks and You

http://www.thecodedself.com/autoresizing-masks/
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Sep 17, 2018 1:03 pm    Post subject: Reply with quote

r - Just realises app developers now have to support, in iOS 12, 4.0", 4.7", 5.5", 5.8", 6.1" and 6.5" iPhone screen sizes!

"after mastering creating views and layout in code i find that i program much
faster and more centered - everything is in one place. after getting used to
is it is by far more superior than handling with code and a layout builder.
most of the big companies write their apps only in code. (also with source
control it is easier to merge than xib files but that's a different reason to why
i use it). i built to myself some very useful snippets in Xcode that's how i
don't need to repeat writing common code twice, and also i built to myself a
really easy to use auto layout manager (*extension) that with one line of
code i can set the entire layout of a view. you can check this file if you want
this is what i wrote and using: (main function is anchorTo)"

https://github.com/nimrodbens/SwiftAutoLayoutHelpers/blob/master/UIViewAutoLayoutExtension.swift
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Thu Oct 25, 2018 11:37 pm    Post subject: Reply with quote

https://pedrommcarrasco.github.io/posts/power-up-your-anchors/

Programmatically done Auto Layout is still the preferred way of implementing views by a lot of developers. While there amazing open-source frameworks, most of them differ from Apple's anchor syntax. Therefore, by adding them to your project, you'll raise the entry level complexity of your project and increase its learning curve. In this article, you'll learn how to avoid adding an external dependency and create your own layer above NSLayoutAnchor to solve some of its issues.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Cocoa All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group