2 UITableViewCells side by side without a custom background image? - ios

I'm trying to make something like this in my iPhone app:
Is there an easy-ish way to do this without making background images and such? I'm following a "Drawing a Grid in a UITableView" guide found here: http://usxue.is-programmer.com/posts/14176.html but so far I can't get the rounded edges with borders like a normal grouped table view has.
Any ideas? Thanks!

After looking around and running into issues, I think my best bet is just to make two UIButton objects here. A LOT EASIER than what I was trying to do.

Related

Swift Animation Similar to Line Chart

my question can be a little bit confusing, however I will do my best to explain it. So I need to create a view like below in the image, which looks like a line chart.
In other words, the line thumbs should be interactive, so that user can move them up and down, which will led to the movement of "ropes" between each pair. The problem is I can not figure out to start what kind of structure in swift so that I can create this view. So far, I am thinking about to create separate sliders and connect them by drawing, lines between them, but I think there should be some better solution. Any help, idea, advice or hint is appreciated. Thanks in advance.
Part 1. Learning to use "drawRect" in a UIView
Make a custom view, i.e. subclass UIView. To draw the nine angled line segments (and indeed the grid behind) you'll need to master core graphics. Fortunately there are many of QA on this very topic:
How to draw a line in the simplest way in swift
Part 2. Custom layers in UIView
You'll have to learn about adding custom CALayers to views. There are many examples of this, eg
https://stackoverflow.com/a/57465440/294884
https://stackoverflow.com/a/41553784/294884
(Note that for the small text labels, I would probably simply add many UILabels programmatically, which you will also need to learn about.)
Part 3. Using UISlider
There's really nothing wrong with using a UISlider for each of your red dots. If you're just getting started with iOS, I suggest trying that first to become familiar with it.
A handy tip is, simply use a horizontal stack view to hold them all - you can space them as you wish.
Part 4. Using gestures
Beyond UISlider. The red buttons would most likely be custom UIViews. And, most simply, you would use UIPanGestureRecognizer to detect the finger moving.
Again you can find many QA on this field of study, example Move UIView within parent view using pangesture
If you master these four general fields you will be able to achieve the view in question, good luck!

iOS Swift - Efficient way to design HTML-like Table

I am fairly new to iOS Swift Development and I am currently designing UI for my mobile application and the goal is to produce something similar to HTML Table with header on the left and content on the right like follows:
Currently I have achieved it by using multiple Stack Views and stacking it against one another in the following manners:
However this has caused my Xcode to be very slow (I assume it is caused by stacking too many things and it uses memory).
Therefore I would like to know whether there are other more efficient ways to achieve the same result (produce the same design).
Thanks in advance.
Why don't you use tableview? Add two labels in each cell on left size and right side. Set the style of cell to right detail if you want to use the default configuration.

Which Controller is Used in App?

i am starting a new project based upon some Sketch design. It has following two designs: this and this so my question is how to accomplish this effect, which UIViewController is used here, is there some code example similar to this?
They are both most likely using either a UITableview or UICollectionView.
The cells are customised with what looks like a clear background and shadows all over the place.
They should be fairly straight forward to do. Just very unusual in that you'll have to set a clear background on the cell and add views for the data/images etc...

Unified Background Across Multiple LoginViews

I have a login screen with multiple pages, I am just looking for an idea of what the best approach would be to slide between the different views, whilst maintaining the same background image.
I would like it to appear as if the background image is not changing but the appropriate view would slide in from the side.
Any ideas, or any suggestions on where to look would be greatly appreciated.
Best way is to add the imageView to the UIWindow and every Controller should be with background color clear ;)

What is the canonical way to animate views over a fixed background?

In my two recent questions here and here I laid out my problem a bit, but I want to ask a more general question here. First my goal: I am trying to animate views side to side with a fixed background image.
I am new to iOS, and so I don't know all the tools that are available to me, but each time I started hacking this together I kept thinking that there must be a built-in way to do this. I didn't want to reinvent the wheel, so what is the common way to implement this?
The best approach I think is making a UIView based in two main views:
The background, that always will stay
And on top of it, another UIView with your animated view
In case you want to animate it, its quite easy, just check this:
iPhone UIView Animation Best Practice

Resources