我如何更改width/height的UIImageView. 我有很多不同的图片width/height,我希望它们以 imageView 的大小显示。
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell")
let city = nicosiaPlaces [indexPath.row]
cell?.textLabel?.text = city
cell?.imageView?.image = UIImage(named: city)
cell?.imageView?.frame.size = CGSize(width: 10, height: 10)
return cell!
}
Run Code Online (Sandbox Code Playgroud)
我想让这行代码工作:
cell?.imageView?.frame.size = CGSize(width: 10, height: 10)
Run Code Online (Sandbox Code Playgroud) 我有三个 NSString 变量
NSString *text1;
NSString *text2;
NSString *text3;
NSLog(@"%@"text1, text2, text3);
这仅显示 text1 变量 我如何在 NSLog 中将所有变量显示在一行中?
谢谢