Uploaded November 2012 | Updated September 2026, 2 weeks ago
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
techytube.com/author/pavel
The UIImageView class provides a view-based container for displaying images on iOS devices screens.
Because we have both simple screens(where one point is equal to one pixel) and Retina Display screens, it is HIGHLY recommended to have 2 versions of any image: one with its natural name, and the other with the same name, but with the "2x" suffix at the end(before the dot and the extension).
When we drag-and-drop images inside our Xcode projects, we have to make sure that the "Copy items into destination group's folder (if needed)" option is checked(because we want to keep all the graphics for every specific project inside itself).
It is necessary that the UIImageView object on our screen to have the same dimensions as the non-retina image dimensions, so that it doesn't get scaled.
In Xcode we can visually assign the image we want to set to the specific image view, and it also knows what images we've added to our project, and assist us while typing the image name.
For more details, please visit Apple's Online Documentation at:
developer.apple.com/library/ios/#documentation/uikit/reference/UIImageView_Class/Reference/Reference.html
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
techytube.com/author/pavel
The UIImageView class provides a view-based container for displaying images on iOS devices screens.
Because we have both simple screens(where one point is equal to one pixel) and Retina Display screens, it is HIGHLY recommended to have 2 versions of any image: one with its natural name, and the other with the same name, but with the "2x" suffix at the end(before the dot and the extension).
When we drag-and-drop images inside our Xcode projects, we have to make sure that the "Copy items into destination group's folder (if needed)" option is checked(because we want to keep all the graphics for every specific project inside itself).
It is necessary that the UIImageView object on our screen to have the same dimensions as the non-retina image dimensions, so that it doesn't get scaled.
In Xcode we can visually assign the image we want to set to the specific image view, and it also knows what images we've added to our project, and assist us while typing the image name.
For more details, please visit Apple's Online Documentation at:
developer.apple.com/library/ios/#documentation/uikit/reference/UIImageView_Class/Reference/Reference.html




![Working with UITableViewDataSource protocol in iOS Part1
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
http://www.techytube.com/author/pavel
The UITableViewDataSource protocol is usually implemented by an ViewController class that mediates the applications data model for a UITableView object. The data source provides the table view object with the information it needs to construct and modify a table view.
As a representative of the data model, the data source supplies minimal information about the table views appearance. The table-view objects delegate—an object adopting the UITableViewDelegate protocol—provides that information.
The two required methods of the protocol provide the cells to be displayed by the table-view as well as inform the UITableView, and they should look as below:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @Cell;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
return cell;
}
We can also set the cells properties, for example:
cell.textLabel.text = [NSString stringWithFormat:@Cell %d, indexPath.row];
Many methods take NSIndexPath objects as parameters. UITableView declares a category on NSIndexPath that enables you to get the represented row index (row property) and section index (section property), and to construct an index path from a given row index and section index (indexPathForRow:inSection: class method). (The first index in each index path identifies the section and the next identifies the row.)
For more, please visit Apples online documentation at:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewDataSource_Protocol/Reference/Reference.html Working with UITableViewDataSource protocol in iOS Part1](https://i.ytimg.com/vi/9GhpTYG1weA/mqdefault.jpg)





