Floating algorithm

The floating algorithm takes care of floating the Elements to their position This is essentially the same as you find in regular CSS. You can also turn of floating on elements you want to control with swift code. Like a scrollbar slider. Or graph elements in a graph.

Content of page:

  1. Examples
  2. Thoughts
  3. Tasks


The floating algorithm at work: (2 boxes in a Section that both are set to float:left and clear:left) img

float:left;clear:left; img

float:right;clear:right; img

float:left;clear:none; img

float:right;clear:none; img

float:none;clear:none; All boxes are on top of each other, Use swift code to position, and or animate. img


  • I think we should redesign the Window element to act more independently, the window should act as an element and just use the view as a vessel for the content. test if this is possible of course
  • Window cant be a view so we have to use the getParent(isAbsolute:Bool = true) to get the view to work on.


  • [x] Complete the algorithm
  • [x] Start testing with boxes
  • [ ] Add more complex test cases
  • [ ] Create a nice animation showcasing how the floating works in different scenarios
  • [ ] Test resizing
  • [ ] Test center aligned
  • [ ] Add support for default floating and clearing values
  • [ ] When testings are solid, solve the “hit area for skin elements” and then Start making the rest of the components

Related Posts

Startup Oslo

“Kulturhuset” is a new place in the startup scene in Oslo. It’s “free” and can be used by anyone to collaborate or work on different projects.

Infinite Tree List

My notes on Infinite tree list

Protocol Inheritance

My notes on Protocol Inheritance

Protocol Ambiguity

How to differentiate protocol ambiguity

The Ultimate Xcode Workflow

Spend zero time managing dependencies

Faster Xcode With Spm

How you can speed up compile times in XCode with Swift Package Manager

Spm And Ci Travis

My notes on Swift PM + CI Travis

Spm And Nested Frameworks

My notes on Swift package manager + XCode + Nested frameworks

Xcode And Spm

Here is how you use Swift package manager in your XCode app projects

Carthage And Nested Frameworks

A few workflows concerning Carthage and nested framework