Unable to make view equal width to cell in iOS?

后端 未结 3 563
时光说笑
时光说笑 2020-12-19 17:35

I am making a custom cell in iOS.I have added prototype cell.I m trying to add a view inside a cell of equal width to parent cell.But the width of cell is not equal please t

3条回答
  •  醉酒成梦
    2020-12-19 17:54

    As I checked your sample project I found that You made your viewController size to iPhone4.7 inch...and I checked the source code of storyboard and I found that targetRuntime="iOS.CocoaTouch"

    So, at the time of preview,it just copied the reference for preview which is basically iPhone size and display you the iPhone size preview...

    For the solution what I do is...just change in Storyboard source code..

    Search for targetRuntime="iOS.CocoaTouch" and change it to targetRuntime="iOS.CocoaTouch.iPad" and then just check preview...and you can see that it works fine....

提交回复
热议问题