問題描述
ios在表格視圖單元格中視覺調整圖像大小 (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!
參考解法
方法 1:
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.
方法 2:
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.
方法 3:
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.
(by serverman、djserva、tekstop、serverman)