简体   繁体   中英

ios visually resize image in a table view cell

I am new to ios and am working on creating a table view with custom table view cell. I am running into a very simple problem. I am trying to resize an image visually within a custom table view cell (the table view cell content outlets are linked to a custom class). However, I am unable to resize either the labels or the image. Following screen shot is that of my storyboard view and the image. Any ideas if I am missing something? Thanks!

在此处输入图片说明

You need to put the name of your custom class on Class property of TableViewCell like the image. If it does not work, let we know more about the code.

Is this a Static Cell? If you have a UIImageView in your custom cell then you should be able to load the image and IOS will automatically size your image.

This may be a bug in my Xcode Version 5.0 (5A11365x. When I switch to Xcode 4.5.2, I am able to resize the labels. I am developing for ios 7.0. I will download the latest Xcode for ios 7 and see if that fixes the issue.

UPDATE Yes looks like it is an Xcode bug. I just installed latest Xcode Version 5.0 (5A1412) and it allows you to adjust the label and image sizes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM