Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am working on an iPhone app. This app is having many views in which address should show in more than 3 views. Other than creating xib, is there any way to build user defined control like address with events for iPhone in xcode.
You can easily create subclass of UIView to create your own UIView control. You could also subclass UIControl if you like. Then you should implement the functionality of the control inside the created subclass.
Once you have your own UIView subclass ready, you can place it in either Storyboard or Interface Builder and choose the class of the control. Just be careful that if you subclass UIView, you also place UIView on screen. Or you can place those in code.
More information about subclassing on links below:
https://developer.apple.com/library/ios/documentation/uikit/reference/uiview_class/uiview/uiview.html
http://www.raywenderlich.com/1768/uiview-tutorial-for-ios-how-to-make-a-custom-uiview-in-ios-5-a-5-star-rating-view
Proper practice for subclassing UIView?
There is no other way of defining your own custom control in Xcode, apart from creating .xib.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm trying to reproduce into my own app the animation that occurs when you select a cell in the App Store's Today section. Here's how it looks:
The difficulty here is that the views that make the content of the cell seems to be moving from the cell to another UIViewController (detail) while being animated in the process. I guess it has something to do with custom segue animators.
How would you write this animator object, and what are the needed steps to perform on the collection view cell and the detail view controller? (using only UIKit and CoreAnimation)
Thank you in advance. 🙂
There is an elegant transition library for iOS like app store animation named HERO.
Please check following link.
https://github.com/HeroTransitions/Hero
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Any ideas how to create like this animation on iOS using Swift ? Thanks
There are three ways to achieve this (probably more than three):
Create a custom header and listen to your table view Scroll, then update the header based on the offset.
Use a third party library like this one:
https://material.io/components/ios/catalog/flexible-headers/
Follow a tutorial (there are many of them): https://www.youtube.com/watch?v=lML5XMLrZEk
Sometimes it is better to do that by yourself, but in this case, I think a framework could help you.
I think it's not the UINavigationBar. You could change nav bar alpha then add custom view to table view or collection view and create animation that you need when scrolling.
Custom Collection view flow layout or ScrollView with UIScrollViewDelegate adjusting the header height when content offset is changing.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How to implement custom grid view layout in iOS swift with custom cells and cells can be resized or aligned anyway. To be exact I have added image.
This is a UICollectionView with custom waterfall-style layout.
You can achieve the same look with CHTCollectionViewWaterfallLayout. You just need to subclass the collection view's layout in the identity inspector.
It's not as easy as it seems actually. You need to subclass UICollectionViewLayout for this behaviour. There is a detailed description of how to do this in the documentation; see Creating Custom Layouts . I also highly recommend UICollectionView Custom Layout Tutorial: Pinterest by Ernesto Garcia.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have another question about iOS programming. I read through this and this, but for some odd reason I cannot figure out how to ctrl+drag the button to activate the switch between them.
This is the way I've set them up, with one storyboard called Main.storyboard and the second one Information.storyboard. A link to the two pictures of the reference and the referenced storyboard
Basically I try to control drag from the button to the reference, but it doesn't connect...
Can anyone hint at what I might be doing wrong?
Kind regards!
Storyboard reference object library.
You can drag and drop it in One storyboard and set a segue to a button or Other object via storyboard.
Select storyboard reference object and select attribute inspector and type another storyboard name which you want to show in next scene. make sure Set its initial view controller.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Hi I'm new to Xcode and don't quite understand the difference between all the view controllers. Eg what is the difference between a uiviewcontroller with a collection view on it and a uicollectionview controller it self? Confused as to why I wouldn't use a view controller then add views onto it depending on my requirements eh table, collection etc. Can anyone help to shed some light?
It's based on your requirements. You may change some properties with your View controllers. But when you use as part of its' controllers, you can't change it.
For example you Can´t change UICollectionView Size of UICollectionViewController(see this).
In these case, you must use UICollectionView in viewcontroller. As like this, if you want to customize some property but functionality are same in all.
Here I mention some ref for you: Ref
You can take UICollectionViewController as a template which will have every thing for you. And view controller is simple scracth pad, you have to add things on it. There are some pros and cons in view controller you have to do every thing yourself, but collectioViewController you got controller with collectionView. But you can not change things as easily in it.