I want to divide UITableView into three part like iOS Music App's TableView like following image
I want to divide like above Image's UITableView.
How can i?
make custom cell, in that custom cell put one view having three
imageViews, set images in such a way that it look likes above design.
create 3 images for left,center, right.
leftImage must have border line at right side for looking it as vertical line & rightImage must have border line at left side for looking like it as vertical line or simply you create one center image having border at both side.
for horizontal line you can simply use default cell seperators. if not then set cell seperator
to none & design above 3 images having top or bottom border line .
you can simply design it through the storyboard and assign your custom cell filename to TableViewCell. you can design custom cell like the link given below in comments
Related
Given that using the minimumInteritemSpacing / minimumLineSpacing settings on an iOS collection view creates a space rather than a solid border between cells, how can we style a solid border of consistent width around each cell in a collection view grid with a seperate colour applied as the background to the main collection view (so that after the border of the last cell a different background colour is visible) using these methods?
This is the best example of a solution I have seen so far but it is for objective C only rather than swift 3. The author also outlines the shortcomings of a couple of approaches I have already tried:
UICollectionView custom line separators
As an additional note the grid contains items of varying dimensions as illustrated here:
github.com/Antondomashnev/ADMozaicCollectionViewLayout
Edit - Here is an image of the effect I'm trying to achieve:
Custom CollectionView
It also highlights the problem that whil]1st the blue borders are most easily created using minimumInteritemSpacing / minimumLineSpacing the spaces created (whilst accurate and evenly spaced) just show the colour of the background view beneath the cells so you are left with one solid colour as opposed to the blue and yellow combination shown in the image.
I was able to get the result I wanted by setting a minimumLineSpacing and minimumInterimItemSpacing value of 0 to group the cells together and dynamically adding / removing borders as CALayers using krotov's answer here: UIView bottom border?
I'm trying to create an iOS app and I want something like the pics below which when I tap the down arrow, the text and view expand.
I have no idea how it would be possible or even what should I call it.
Expanded one:
Edit:
StoryBoard:
There is a view for Video player top and a ScrollView down which contains an image and a tableview. what i want is that put the above feature(2 pics above) instead of that image. and scroll all image and tableview up to be behind of video player view
Using Autolaout you extend the height of your textview based on content size and your view
You need self sizing cell with tableview automatic dimension you can find tutorial for that
in label set number of lines 2 and line break mode to truncate tail initially ,
on tap of button action you need to set number of line 0 and line break mode world wrap , and use beginUpdate and endUpdate tableview
You have to add action (selector) to the button and in it you have to modify the frame and properties of containting view. Please post some code/storyboard for detailed answer.
I have a login table that give to my users many forms to create a account, inside my table I have a cell with a UILabel, all I'm trying to do is create two horizontal lines around the UILabel like this image below:
Example of image
That image have two horizontal lines around the label OR, what better way to do this? And how I can do this?
You can create lines out of very thin UIViews with a background color of gray or black. In storyboard, drag a UIView in front of the UILabel in the cell, size according to your preferences, and copy it to make one after the label as well.
How are the thin, centered lines between "Columbia Dining" and "Subject" and "Message created"?
TableViews with static cells tend to have a similar line between each cell, but the difference is that it stretches all the way to the right of the screen. I'm not looking for any code, just somebody to point me in the right direction.
Using an ultra-thin UIImageView seems sloppy, and isn't quite as elegant. I've seen these in multiple apps but I'm not sure what is used to make them.
In Interface Builder, select your UITableViewController.
Table View > Show the Attributes inspector:
Change Separator style, color, inset, etc.
This will have the side effect of showing separators at the table view level (not the cell level). Even non-existing, empty cell, will have a separator.
For cell-only separators, select Separator: None in IB, and add a 1/2 pixel tall UIView at the bottom of your prototype cells.
Any old plain UIView with a backgroundColor, alpha and height will do. User proper layout constraints to locate that separator adequately:
â–º Find this solution on GitHub and additional details on Swift Recipes.
If you scroll all the way up on the iBook, you can see an apple mark (above search and two buttons). How can you put such image on top of the TableView?
My first guess is that apple just used an image as its background and somehow aligned it right. Am I on right track?
It's a UIImageView, either set as a tableHeaderView (check the docs) with the table given negative-top contentInset, or just added as a subview of the table view itself. The latter's probably simpler—just set the image view's position to something with a negative Y value.