in Education by
Hello I am using native UITableViewCell in my UITableView. When I set the image of the cell it looks like image view not aligned to the 0th x position in UITableViewCell. There is a gap or padding between the UITableView & the cell.imageView. I did like this in cellForRowAtIndex CGRect imgRect=cell.imageView.frame; imgRect.origin.x=0; cell.imageView.frame=imgRect; but still same. nothing changed. How can I align the cell image to the edge of the table. Please help me. Thanks JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
To align the image view to the leading edge of the content view, first you need to create the custom UITableviewCell, follow below steps to create subclass(see the link to create custom tableviewcell) Choose File > New > File (or press Command-N). On the left of the dialog that appears, select Source under iOS. Select Cocoa Touch Class, and click Next. In the “Subclass of” field, select UITableViewCell and create tableview subclass named "CustomTableViewCell". Open Storyboard, in the outline view, select Table View Cell. Open the Identity inspector. find the field labeled Class and select "CustomTableViewCell" from the list. after the tableviewcell is done drag the imageview and set the constraints for top, bottom and leading to the cell content view and keep the constant as 0. Add the height and width constraint for imageview.

Related questions

0 votes
    My app has separate code and bundle (xib are to be downloaded separately). I can't change my code ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 8, 2022 in Education by JackTerrance
0 votes
    I have a UITableView inside a UITableViewCell (Scrolling is disabled for the nested UITableView) Everything works ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 3, 2022 in Education by JackTerrance
0 votes
    I have a UITableView inside a UITableViewCell (Scrolling is disabled for the nested UITableView) Everything works ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 26, 2022 in Education by JackTerrance
0 votes
    I have a UITableView inside a UITableViewCell (Scrolling is disabled for the nested UITableView) Everything works ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I want to change the images in image view on Onclick function. I have already tried this: bt_audiocapture. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 23, 2022 in Education by JackTerrance
0 votes
    How to remove a image in imageview in android and also how to hide the entire image. Here I have ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    I have a UICollection that shows a padlock on cells that locked to users who aren't logged in. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 16, 2022 in Education by JackTerrance
0 votes
    I am creating an UITableView using auto layout and prototype cells. I would like it to act more like ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    I have a UITextField inside of a UITableView cell. When I rotate the device, the textfield is still the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I have a UITableView of customers where a row/customer is selected. The user can then push another view ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I have a UITableView of customers where a row/customer is selected. The user can then push another view ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 25, 2022 in Education by JackTerrance
0 votes
    I have a UITableView of customers where a row/customer is selected. The user can then push another view ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 25, 2022 in Education by JackTerrance
0 votes
    I have a UITableView of customers where a row/customer is selected. The user can then push another view ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    I want to add multiple columns in UITableView. I have created one CustomeTableCell with two lines used - ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I want to add multiple columns in UITableView. I have created one CustomeTableCell with two lines used - ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
...