I am working on a project and with the hopes of developing my skills and providing open source package in iOS. I came across a unique interface that really got my attention which comes from a great app and there are two main things I would want to work on.
Pull to add and release to add.
This feature I know was built with a table view but how it was implemented remains unknown to me
Side navigation which contains time selection. The time overlays the tableview in this part
I would be glad if anyone could gimmie tips on how to go about this things or open source libraries that one can reference.
The application is Sorted you can check it out on the App Store
Look up on the following topics,
UIPanGestureRecognizer (this is to recognize the pull down)
CGAffineTransform (to rotate the text field)
Movement/Transformation of the elements could be done by changing the constraint values and calling UIView's layoutIfNeeded inside an UIView animation block
You can make the keyboard appear by making the text field first responder
If you are interested in building rest of the features 'Sorted' has. They you may check https://cocoapods.org/pods/FoldingCell for some inspiration :)
Related
I'm working on a Dialog for my iOS app, and have decided that the default boxes don't allow for the level of customization I am looking for.
So, I have created a view inside a storyboard. It is embedded in a view called DialogBoxView inside DialogLayout.storyboard with a view controller called DialogLayoutViewController.
In short, I want to be able to open the specific view as a Dialog. (Like this below.)
But, as previously mentioned, I want the View inside the Storyboard to inflate as the dialog's layout.
What I need is a way to call into the ViewController handling the Storyboard [I can do this] and open the specific DialogBoxView inside.
See:
My Hierarchy
See:
My Layout
Please note that I have browsed around a bit on Google, and nothing is useful. It is either outdated (OBJ-C) or not what I really need.
Additionally, is it possible just to (like in Android/Java) "inflate" the View layout as the Dialog's view?
Summary:
Can anyone give me an example on how to inflate a specific view (inside a Storyboard) as the dialog programmatically from the ViewController?
I'm still kinda new to Swift and iOS development in general, and I have come across some functions that may work, I just can't put them together in a way that actually works.
NOTE: I have found a way around custom layouts, but am still curious as to how this might work.
Swift 5
Some time ago, I created one project similar: You can see in: https://github.com/MaatheusGois/custom-alert
I'm creating a new universal iOS app that I'd like to use the following interaction pattern (when in a non-iPhone size class):
Starting with a full-screen tableview, the user can navigate through successive viewcontrollers, with each new one effectively "stacked" or layered over the previous one, with the previous one fixed to the left edge of the screen and the current one occupying around 80% of the screen's width, so the previous one can be seen "underneath". To go back, the user taps anywhere on the previous (greyed out) view.
I thought this might be possible with the default master-view template but that almost seems to do the reverse of what I'm after. I also looked at some third-party cocoapods, such as PKRevealController and ECSlidingViewController but they don't appear to be maintained any more.
Is this type of interaction possible and straightforward? What sort of approach should I take?
Ok so it looks like Spotify solved the problem for me. SPStackedNav has an SPStackedNavigationController which does exactly what I want to do.
I have played a lot with my app and I do not understand how to make layout like in for example iTunes (also many apps uses it).
How it is made? It is one big CollectionView, but with special Flow or it is TableView with many CollectionView?
Collection headers. In iTunes App if I select item (with adjustImageWhenFocused) under the header then the header will jump up and the item will not overlap the header. It is special magic or it is system behavior and I just do know how to use it?
Below is two screenshots about what I am trying to tell you and example with my app.
In iTunes there are movie preview page. With what type of View it is made? TableView,CollectionView or just ViewController with ScrollView?
I have read many sources and looked up demo projects, but nowhere I have found answers for this questions.
1) I think it would be a stackTemplate containing a couple collectionLists.
2) AFAIK the headers "jump up" on their own, no need to prepare anything special.
3) productTemplate?
For examples, see https://github.com/iBaa/PlexConnectApp, /TVMLTemplates/Default/Movie_OnDeck.xml (1) or Movie_PrePlay.xml (3).
Or check the gold source: https://developer.apple.com/library/tvos/documentation/LanguagesUtilities/Conceptual/ATV_Template_Guide/StackTemplate.html, plus other Templates.
If you want to use native Swift way it can be achieved in following ways:
You can use table view and have collection view within each cell. I am using same approach to achieve this.
We have focus update delegate from there you can find the focused frame of image view. With the help of focused frame and label frame you can check if they are intersecting or not. Based on that you can move label up and down.
This is native TVML template, in order to achieve in swift you need to create view using tableview and collection view.
I have been searching for a UI Control and don't know what its called, which makes it tough to find right? What UI Control in iOS 5 or 6 provides a view overlay that can swipe away? Kind of the opposite of a slide-out nav view. I am looking at the TouchArcade app as an example, where you tap an item and this slides out an overlay with an article or review. Its also possible to have several overlay's that can swipe to the right for removal. Is this a custom control? I know this must be an easy question, I just don't know what its called, and therefore, my terms don't help much in Google. The closest thing I have found is ShinobiControls Overlays: http://www.shinobicontrols.com/shinobiessentials/
I'd rather just make my own than rely an somebody else's library I have to keep up to date. On the other hand, that one does look pretty good and would save me time.
Edit:
Picture of TouchArcade as an example overlay view.
You see how the article is presented over the list view below? What controls do that in iOS? It also allows multiple overlays as you click further into each item. You dismiss them by swiping them to the right, dragging them out of view.
I'm making a sample app to learn iOS dev, and I have the app create default items to populate the tableview originally, and you can add further ones as well.
If I tap on the default ones (well, there's only one) and segue to the detail view it shows all the details (Name, Location and Date) as intended. But if I add a new one, it comes up with those fields being Empty.
I can't figure out why. I have seemingly all the view refreshing methods set, and it should be setting the detail view's data object which then feeds the labels.
Could anyone help? I'd supply further code if requested, I just don't know what to supply now as I'm not sure exactly where the problem is. It's a rather simple app, though.
Project available here: http://cl.ly/3N0o272M3y1K
Ok this took a bit longer than planned - but it is a good way to learn.
I have attached the project in a zip file.
The code is a bit different then what you posted, but if you compare them side by side, you will see how they are planned and build differently.
It shows the Segue working within the Storyboard.
There where 2 big problems with your project outside of your misuses of the methods.
You need something like Core Data if you want your data to be persistant. In the example I have given you I have used Plist, this will do the trick, but is not persistant in this case.
Also your detailViewController had no labels for the text to appear, so you will need to look into Custom Cells for that - to match your design.
Good Luck and I hope this is useful:-)
Updated Project