iOS how to split static cell into two sections - ios

I am very new to both Objective-C and iOS development and I am trying to build a form in my app. I want to be able to split static cells into two sections as shown in this screenshot:
This is exactly what I am trying achieve, two static cells with 2 sections in each, each section containing a UITextField. What is the best way to do this?
Any help / advice is very much appreciated.
Thanks

You should just create a UIView, and round the corners of the layer. Add the UITextFields onto the UIView, and draw the separators onto the UIView.

Why dont you just drag out 4 UILabels in the areas you require.
Create a background image which has the grid / colours you desire.

Related

how to create horizontally scrollable tableview and collectionview using swift 3

Hello all I'm trying to implement scrollable collection view along with tableview.
Please find the attached images this is exactly what I'm trying to implement.
image1. image2.
but I can't figure out what layout would I use in order to achieve this goal, any input/tutorial would be appreciated.Thank you.
Imageview list for category is basically a carousel control. So to achieve that you can check following two third party implementation. This will help you out.
https://github.com/nicklockwood/iCarousel
https://github.com/robertrr61/Image-Carousel
Otherwise you can also create your own control using Scrollview and image view with a little bit customization.

iOS Swift trouble making detail page with embedded list and collection view

I am new in iOS development and Swift, I'm struggling creating a relatively simple detail page.
For now I have this layout made with interface builder:
The parts highlighted in red must have variable heights, every element is inside one big stack view which is inside a big scroll view.
The list of phone numbers is a label with Lines set at 0 so if I understood correctly that element will size itself correctly with the content.
I don't know how to implement the other two lists and how to make the whole layout to wrap onto the content.
To make you understand better I'm struggling because I'm used to make layouts in android and so making extensive use of the wrap_content option.
Thanks in advance
I think, you could use UITableView for image+text list and UICollectionView for images. If you are using constraints you have to add height constraints to your tableView and collectionView, but you could update those constraints from code with real heights.

UI Buttons with tableview

I am trying to code a tableview with words on the left and buttons on the right for each row. Is that possible to do?
I have got the words coded for each row however I am struggling with putting the buttons on the right side and spaced evenly as well as following the screen when scrolling up and down the tableview.
At the moment I have just been adjusting the button's y axis numbers from the right side controls in the x code to make sure the buttons are evenly spaced but it is not following the scroll. Is there is an easier or more efficient way of doing this? Any help would be great.
Thanks!
You should create your own UITableViewCell. Apple has a tutorial in their documentation how to do that. It's written for Objective-c, but you can easily change it to swift. Also there are tutorials like this tutorial on YouTube.
Basically, what you need to do is creating a UITableViewCell and use it instead of the normal UITableViewCell in the cellForRowAtIndexPath. After that, you can add whatever elements you'd like to have.

iOS UITableView cell layout questions

I have a chat on a web site that looks like this.
I am now building an iPhone app for this and have some problems creating the same layout. I hope you can point me in the right direction. Is subviews or webviews the best choice?
If using UIView, UILabel and UIImage, what is the best way to make rounded corners and the little arrow. The gradient background should not scroll with the table view. What's the easiest way to calculate the hight of each message? What is the best way to async load the images over http?
If using a webview, what is the best way to populate it with data? Building string? Having a template and populate the image, username, time and message thru JavaScript? How can I resize the UITableCell and UIWebView to fit the contests?
Will a table full of UIWebView be much slower than using labels? Will I need to create it twice to return the height of the cell in heightForCellAtIndexPath and add it in cellForRowAtIndexPath?
Thanks for your help!
If you wish to see it live, visit www.aktieguiden.com
This is really a lot more than two questions, and I'll answer several of them.
I would use a table view with a resizable UIImage and a UITextView for each bubble. Use an image of the bubble in png with a transparent background, and make it resizable. Import it with UIImage's -(UIImage*)resizableImageWithCapInsets:(UIEdgeInsets)capInsets. To determine a height, UITextView has a contentSize property which will tell you the size of the view that can be scrolled. For asynchronous loading, use one of the many tutorials or frameworks for that purpose. Here is one:
http://developers.enormego.com/view/what_if_images_on_the_iphone_were_as_easy_as_html

Advice on Twitter like UIView

I have a question on some UIView stuff. I want to create a Twitter-like UIView cf image. So, how to create this type of view? Is it composed of several UIViews like 1 for the topbar and a second for the content (white one).
If yes, how to create this shadow between these views?
How to create the white arrow on top left (just under the image).
Any code sample will be appreciated. Thanks all!
http://i.stack.imgur.com/MM8Qt.png
It's simple UIViewController with white background, containing UITableView with one cell.

Resources