0

I have one bug in which proportional constrain not working properly My image view size is 220 * 176 in 5S devices I want height and width proportionally in bigger devices

Check this image

Image size will be 1280 * 1024 which is coming from backend, i tried but in bigger devices, it is not working properly i am attaching demo project

Project code : http://s000.tinyupload.com/?file_id=93936193814910752298

In this project code there is one vc in which i have taken scrollview and inside scrollview i have taken tableview in that view it is working perfactly but i want to take table view only in view controller so please check it in table view controller only

Mayank Patel
  • 3,868
  • 10
  • 36
  • 59
  • you have only tableview than attach tableview to view with equal height it may help –  Jan 16 '18 at 04:35
  • Why i need to take scrollview ? – Mayank Patel Jan 16 '18 at 04:38
  • first you define scroll so some confusion sorry for that and your Xcode version is bigger than mine so i dont give you proper solution. –  Jan 16 '18 at 04:39
  • this will surely help you https://stackoverflow.com/questions/28513625/autolayout-origin-and-size-should-change-according-to-width-and-height-factor – Mayank Jain Jan 16 '18 at 04:58
  • Yeah i checked that but my problem is my view is inside tableview cell so i can't give the proportional constrain to view height @MayankJain – Mayank Patel Jan 16 '18 at 05:01

1 Answers1

1

As you have explained that you want to increase/decrease size of image according to device size.

I have tried to solve the issue. Refer http://s000.tinyupload.com/index.php?file_id=54760890874471716136

Hope this will help you.

Priya
  • 735
  • 5
  • 10
  • Can you check description not working properly rather then description it is correct – Mayank Patel Jan 16 '18 at 05:43
  • Can you elaborate, I am not getting your point of "description" you have mentioned. – Priya Jan 16 '18 at 05:46
  • see this : https://imgur.com/a/ldmXK , https://imgur.com/a/JKD4d please run this app it is not working can you check? – Mayank Patel Jan 16 '18 at 05:49
  • Do you need constant height for the bottom label? – Priya Jan 16 '18 at 05:55
  • yes currently description label it is not displaying properly in bigger devices – Mayank Patel Jan 16 '18 at 05:57
  • We just need to set leading trailing top and bottom constraints for label. Label will adjust its size automatically according to its content so what is the requirement of setting constant height for label? – Priya Jan 16 '18 at 05:59
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/163223/discussion-between-mayank-patel-and-priya). – Mayank Patel Jan 16 '18 at 06:02