I'm making an app that imitates Twitter with Xcode.
Clyde uses Nifty Cloud.
Error messageThe photo is not reflected on the icon on the timeline post screen.
source code:Swift
Source code
// Calling a registered cell
let cell = tableView.dequeueReusableCell (withIdentifier: "Cell") as! RoomTableViewCell
From the collection of data called // posts, data such as text and userName are brought in order from the top
//? == "nil is allowed"
cell.contentLabel? .text = posts [indexPath.row] .text
let user = posts [indexPath.row] .user
cell.userNameLabel.text = user.displayName
let userImageUrl = "https://mbaas.api.nifcloud.com/2013-09-01/applications/HlgrPhqq9ECHzZT3/publicFiles/VKD52cVhRFPhLmTY.png"
// Round the photo
cell.userImageView.layer.cornerRadius = cell.userImageView.bounds.width/2.0
cell.userImageView.layer.masksToBounds = true
// Displaying the number of likes
cell.likeCountLabel.text = String (posts [indexPath.row] .likeCount)
cell.tag = indexPath.row
if let userImageUrl = posts [indexPath.row] .user.imageUrl {
// Acquire images with kf
cell.userImageView.kf.setImage (with: URL (string: userImageUrl), placeholder: nil, options: nil, progressBlock: nil) {(image, error, cache, url) in
if let error = error {
// Display "unknown error happened"
print (error.localizedDescription)
}
// Paste photo after successful acquisition
if let image = image {
cell.userImageView.image = image
}
}
}
-
Answer # 1
Related articles
- ios - [swift] i want to display the image dialog
- ruby - i want to display the timeline by assigning the tweet embedding code to a variable [rails]
- css - i want to display the image size from 0% to 100% without using a mask
- html - no background image is displayed how can i display it?
- python - i want to display an enlarged preview of an image
- java - i want to display an image
- ios - i want to display the initial text value of uitextfield in swiftui
- image display using amazon s3 on heroku
- html - ogp image display on line
- swiftui - i want to display image and text side by side in the header element of section structure of form
- java - i want to display the processed image on the screen
- ios - i'm stuck with a basic tableview display
- javascript - i want to display an image on a canvas and rotate it 90 degrees to the right each time i press a button
- [swift5, ios-charts] i want to display a circle (round spot) in a specific place (value)
- python - tkinter display image cannot be saved
- php - i want to display a dummy image when there is no image in acf
- ios - how to convert an image to data in userdefaults or document and save/load it
- ios - i want to use http communication with alamofire [get image]
- ios - the size of the placeholder image does not fit the imageview
- python - matplotlibpyplotimshow image display
- ios - swift5 video playback
- ios - i want to get only 0 from the array of 0s and 1s
- ios - [xcode] regarding the screen transition, it became a strange screen display
- ios - [xcode] the cause that the application under development does not start after a while after building it on the actual mach
- ios - i want to draw like swift when creating an array
- ios - transition screen in authentication with firebase
- whether or not a small screen like picture-in-picture can be realized on the screen of a self-made ios application
- ios - [swift] how to get all the values in the tableview cell and pass them to the transition destination
- ios - duplicate save is executed in coredata
- ios - core bluetooth data exchange
Is the URL correct in this line?
In short, I think that processing has not been performed up to the line "// Get image with kf".