UILabel无法显示其所有字母。 我的应用程序就像now my appUILabel无法显示其所有字母
PhotoController(就是这个页面)是
import Foundation
import MobileCoreServices
import UIKit
class PhotoController:UIViewController,UINavigationControllerDelegate,UIImagePickerControllerDelegate{
@IBOutlet weak var label: UILabel!
@IBOutlet weak var myImageView: UIImageView!
private var imagePicker:UIImagePickerController!
override func viewDidLoad() {
super.viewDidLoad()
label.text = "Tap the PhotoSelect or Camera to upload a picture"
//myImageUploadRequest()
}
所以,
label.text = "Tap the PhotoSelect or Camera to upload a picture"
所有字母在我的应用程序没有显示。
我应该怎么做才能解决这个问题?
label.numberOfLines = 0;默认情况下,UILabel将只有1行。 – Developer
给number0fLines = 0 –
看到这个https://stackoverflow.com/questions/446405/adjust-uilabel-height-depending-on-the-text –