nsomar / OAStackView

Porting UIStackView to iOS 7+
MIT License
2.14k stars 191 forks source link

Add Support for UIStackView for >iOS7, even on storyboards Issue #2 #60

Closed m1entus closed 8 years ago

m1entus commented 8 years ago

Okay check now @oarrabi @garnett , i ammended latest commit

delebedev commented 8 years ago

I've seen this functionality in another implementation of stackView and it is definitely handy, but inline assembler scares me a little bit. @oarrabi please take a look at this PR

m1entus commented 8 years ago

@garnett actually without asm it also works fine, i removed unnecessary code and added sentinel if someone would like to turn of replacing class in <iOS9.

m1entus commented 8 years ago

Any progress with that ?

nsomar commented 8 years ago

@m1entus hey, sorry for the super late reply, I will be working on this on the weekend, thanks for the great addition :)

m1entus commented 8 years ago

Any progress ?

m1entus commented 8 years ago

...

nsomar commented 8 years ago

Hello @m1entus, I am extremely sorry for the delay, will check this on the weekends. Sorry for the inconvenience :disappointed:

delebedev commented 8 years ago

@m1entus could you please rebase your work on current head? Sorry for returning so late

m1entus commented 8 years ago

Done

delebedev commented 8 years ago

@m1entus looking at your PR and it is really awesome! Could you please elaborate what `OAStackViewPatchEntry`` actually is, when is it invoked, is it documented, etc.?

Another thing I see is that there is a plenty of constraint errors in the log (maybe it is the reason I see different behaviour of OAStackView and UIStackView with the same setup)

m1entus commented 8 years ago

OAStackViewPatchEntry is static constructor, it is called automatically. Probably https://github.com/oarrabi/OAStackView/commit/a683019f19680678f5c11a7ba78d198c0c454faa this commit change some storybooad constraint, thats why there are errors on setup. Could you just cherrypick OAStackView.h file, and apply it? It doesn't break anything in library, only replace UIStackView symbol in <=iOS8, and would be useful.

delebedev commented 8 years ago

@m1entus I've already fixed constraints now everything looks pretty fine. I realised that there is no point to compare stackview in both tabs, because their "default" setup is different - one is built as UIStackView in IB and another is just a set of views added to superview, so it is not bothering me anymore. I will finish reviewing this PR and merge it soon, can't wait to start building stackview in XIBs for iOS8! :bowtie:

delebedev commented 8 years ago

Sorry I had no idea what is the best workflow for patching this pr so I create mine based on this one and merged it manually: https://github.com/oarrabi/OAStackView/pull/75

Thanks a lot @m1entus!

m1entus commented 8 years ago

Cool thanks :+1: