I'm trying to implement a horizontal resizable divider on a UIViewController.
Something like this sample from github (the sample is vertical, but easily adaptable to horizontal, which I already did in an Android app)
I'm pretty sure someone has already done it, but somehow seems in using the wrong keywords in my search and I have come up empty.
The idea is to have a UIWebKit on the top portion of the view, and a UITableViewController on the bottom, where both can be resized by a divider on the middle that separates them.
Here's a screenshot of the Android app... the black line in the middle is the resizable divider:
Any pointers will be appreciated!
Related
I'm trying to create a complex view using SwiftUI.
I'm trying to do a profile view with two scroll views on top of each other. I created wireframes, so it's easier to understand.
Here you can see the red and blue rectangle. They are both scroll views. I'm trying to achieve that the blue rectangle must only be scrollable from its content (blue section) but must be able to cover the whole screen when we scroll on it. See the next two states:
I tried adding some content inset using the library SwiftUIX, but can't seem to find a way to disable the scrolling mechanism on that content inset. So the red section of the wireframes must still be scrollable when scrolling on that area.
I tried only using drag gestures with offset, but the feeling was not as smooth as a scrolling view, and I could not mimic that feeling.
The default Apple implementation for a bottom sheet is not ideal because it works in steps, whereas I need it to be as smooth and controllable as a standard scroll view.
If any of you had any leads or ideas, it would be life-saving. I have spent hours on this and have been able to find a suitable solution.
I'm trying to implement the following screen in Flutter.
It seems trivial to do so, but I couldn't find a way to achieve the same results. This is what I have so far:
My solution without scrolling
Solution following the Flutter demo but placing a map as a SliderAppBar
As you can see, I have a few problems:
This is the most accurate solution (don't look at the small blue widget moving up and down). I can move on the map and scroll through the ListView but I can't move the divider to expand the ListView. Notice that I don't want the ListView to move to the top, but until the user stops.
This one seems the correct solution but, as you can see, there are more problems: The map seems to resize instead of stay the same but just resize its container, and when I scroll down, I see the background of the Scafold.
Any ideas? This is the link to the solution 1.
PD: Sorry for the links to the GIFs. Their size was about 10MB each and I couldn't upload here.
I'm trying to figure out the structure of this iphone app display, but for the life of me I can't work out a convincing structure. I think my understanding of Nav Bars, Views, Toolbars, maybe embedded toolbars, icons, etc is just too weak to figure this layout out.
I've read endless Apple doc, and net tutorials, but none of them address things as pretty (and complex?) as this layout, simple as it looks.
I've spent hours trying to build a stack view for the top bar, with two left/right icon buttons, with an embedded toolbar (+ 3 bar button items) in the middle. But with zero success -- I posted a separate question on why my embedded toolbar with 3 buttons disappears in the stack view with distribution=Fill Proportionately.
Could anyone give me a convincing layout structure that I can try? And how about the dark blue color, with a sunken border around the 3 center buttons, and a darker background for the selected button? (Is the selected button a separate image from it's unselected state?)
And then the second collection -- is it a view with rounded corners behind the controls, or is it something else? How might I space out the left/right arrows with the long date string button in the middle (not with a horizontal stack view, I'm guessing). And the bottom buttons -- could that be a segmented control?
If you could identify the building blocks for me, that would help. Or maybe a tutorial or doc somewhere, or a code project example somewhere that I could study? (Wouldn't it be wonderful if someone had a sample app with this stuff that I could just load and learn from... :-) PS. I've also looked around the net for sample open source apps, and found probably 50, but none that I could recognize as being on target, or in swift.
Many thanks in advance.
The top area is probably a UINavigationBar, and the three things in it are its left bar button item, its title view, and its right bar button item.
The bottom part is a UITableView in Grouped style. It has two sections. The first section consists of one cell in which is laid out the whole four-subview structure. Then there's another section whose header title is "today" and each of the things after that is a cell.
The two "make a choice" rectangles, both at the top and in the first cell, are UISegmentedControls.
I'm new to iOS development and I'm just getting my way around Xcode 6 working with Swift, but I'm hitting small blocks here and there so please understand why question may be very basic.
My issue is I have a background image (UIImageView) which is placed within a View within a ViewController. All I want is to be able to drag and drop other type of objects like buttons or labels on top in the designer section. When I have the designer view I see these buttons and labels visible on top of the UIImageView, but when I run the project in the iPhone simulator all these objects disappear and I just see the background image (UIImageView). Is there something I'm missing here?
Thanks in advance.
You should read auto layout Apple document https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/
Basically its the way you describe position relatively, say you want to align button center on the UIImage, in this case you define 2 constraints vertical align and horizontal align.
How do I autosize Labels so they contain all the text, but don't take up any more space then necessary and stay vertically spaced the same whether the user is in portrait or landscape mode?
I am trying to implement a simple control that displays information about my app in paragraph form. It will have Headings, and Paragraphs. I am having problems correctly positioning things relative to each other and have them auto adjust as the user rotates their device and changes orientation.
In the example below, I have 4 labels. 2 are for headings and are bolded with larger font, 2 have standard font, but are long and have lots of text. I want to be able to have all the text visible on each label and have none cut off. I also, want all the labels as close as they can be to each other. So, their containing rectangles have to change based on all of the other label's height. So when I change from landscape to portrait orientation, the paragraphs may take 8 lines instead of the 3 lines it takes in landscape mode. I want the controls to shift to have the same amount of Vertical white space between each of them.
Here is a sample:
About this program
Thank you for downloading this app. It is designed to do some
wonderful things and will make all your wildest dreams come true.
Help
In order to use this program, use the tab bar at the bottom of the
screen to select what you want to do. When the view opens, slide the
items across the view until you are done.
I'll quote Mattt Thompson:
This is the type of thing TextKit was created for. Check out Wenderlich's tutorial for an easy start.
I followed the advice in Jason's comment and it works like a charm:
Try using a UIWebView and embedded HTML for your content. – Jason Oct
30 at 19:23
Thanks Jason !!