You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]Will crash on iOS 8.1, iOS 8.2 while work well on iOS 8.4[/-][+]With swift, will crash on iOS 8.1, iOS 8.2 while work well on iOS 8.4[/+]on Nov 18, 2015
changed the title [-]With swift, will crash on iOS 8.1, iOS 8.2 while work well on iOS 8.4[/-][+]With swift, will crash on iOS 8.1, iOS 8.2 for bad access while work well on iOS 8.4[/+]on Nov 18, 2015
You may have a try. It seems that UIStack implementation is replaced by FDStackView using assembly code, which should works fine in Objective-C runtime.
@mokai if use it as pod, make sure to use it as static library otherwise you could get nil.
I just updated pod to dynamic library and found nil will returned in old method. I have to copy FDStackView files to project to make it work. Ugly, but works.
At first we disabled availability checks to reference UIStackView in swift code, but it crashes all if #available(iOS 9.0, *) blocks
Then we took this approach when referencing stack view from IB in swift code (extend the protocol as needed to interact with the Stack View). I believe this could be built in the library with the full supported API.
Activity
[-]Will crash on iOS 8.1, iOS 8.2 while work well on iOS 8.4[/-][+]With swift, will crash on iOS 8.1, iOS 8.2 while work well on iOS 8.4[/+][-]With swift, will crash on iOS 8.1, iOS 8.2 while work well on iOS 8.4[/-][+]With swift, will crash on iOS 8.1, iOS 8.2 for bad access while work well on iOS 8.4[/+]MichaelPei commentedon Nov 19, 2015
I managed to workaround this issue by create the UIStackView in Objective-C code and get it in swift code as function return value.
mokai commentedon Jan 7, 2016
@MichaelPei I try this,But always return nil by create the UIStackView in Objective-C code
MichaelPei commentedon Jan 13, 2016
@mokai Following code works for me
You may have a try. It seems that UIStack implementation is replaced by FDStackView using assembly code, which should works fine in Objective-C runtime.
MichaelPei commentedon Jan 19, 2016
@mokai if use it as pod, make sure to use it as static library otherwise you could get nil.
I just updated pod to dynamic library and found nil will returned in old method. I have to copy FDStackView files to project to make it work. Ugly, but works.
mokai commentedon Jan 20, 2016
@MichaelPei Yea,I use it as pod。。。。
nobre84 commentedon Mar 21, 2016
At first we disabled availability checks to reference UIStackView in swift code, but it crashes all
if #available(iOS 9.0, *)
blocksThen we took this approach when referencing stack view from IB in swift code (extend the protocol as needed to interact with the Stack View). I believe this could be built in the library with the full supported API.