Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm building an iOS app and I have all the functionality going already so it's time to sit down and make it beautiful. I'm not very savvy in this area, this is the first app I've made and I'd like some good, up to date or recent, resources/tutorials on iOS interface design.
I already know how to change the UINavigationBar for instance. But I'd also like to customize my buttons, my tab bar, menu bar, bar button items, and so on. Any good resources for this?
To be more specific, I'm more interested on HOW to do the customization on these elements, not so much as to look for good ideas on how to make them loon, though those are appreciated.
There are dozens of great UI designers around the internetz and a couple of them have great websites!
You can absolutely use them as reference and as inspiration. But you will need to do the work (coding + grafix) on your own.
Your question is a bit to wide ranged to answer it easily. (almost) Every UIKit control has different methods to manipulate its grafix/design. E.g. a UIButton is easy to customize by setting its button style to plain and set a custom Background Image, but that won't work for a UISlider.
Custom images are a popular method to implement a nice design as UI. It's pretty great to work with a good artist or do it yourself if you are experienced with design tools like photoshop and simply add the images of your design to your apps but never forget the weight of images.
Keep the file sizes in mind and don't let a simple app have more than a few mb. (Especially if you want to support retina devices)
In addition to that don't underestimate the power of core graphics. You can do a lot of fancy design stuff like nice gradients as backgrounds or shadow effects by code without the need of images.
Since iOS5 there is a protocol called UIAppearance. It helps a lot to implement custom UI designs but sadly it is not backwards compatible. Just take a look at my favorite tutorial site for iOS stuff about UI customization in iOS 5. Ray Wenderlich - User Interface Customization in iOS 5
And last but not least some common design websites for mobile UI:
dribble
creattica
tapfancy
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
Now I am developing an app which includes music. On that I am using AVAudio player for playing music. My issue is that I need to show a circular progress bar with Play/Pause buttons. The sample image is attached with this.
How can I achieve this.
you can use components for example
LLACircularProgressView
or
UAProgresssView
and you can get lengh of your audio with :
audioplauer.duration
There are some good suggestions above.
You could also use a UIView, set its layer content to the image, and add a CALayer in which you draw the progress arc and CAShapeLayers or filled CALayers to draw the Play/Resume shapes. CALayers are light-weight and straight-forward to work with. You would capture the users touch in the usual way - with a gesture recognizer added to the UIView.
I personally find it is often easier to roll my own in a case like this than to deal with the integration of external projects, mainly because they tend to be much more general than I need, and the amount of work understanding how to integrate them, how to strip out what I don't need etc. ends up being greater than the work needed to make this component myself.
That being said, you should realize that if you roll your own, you have to debug and test thoroughly - whereas with third-party code you are (hopefully) benefitting from the testing of many other people.
For an introduction to CALayers, see the WWDC 2010 session "Core Animation in Practice - Part 1" (full disclosure: I was the presenter).
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm learning iOS and I've gone through a few tutorials now, and one or two of them had you draw all the controls in the IB, and one or two of them had you create them all programmatically.
This leads me to wonder whether I can safely mix and match these approaches. I know the answer is yes, of course, since it would make no sense otherwise.
But what are the advantages/disadvantages? Particularly with regard to proportions and sizing for different screens, that bit is still an obstacle to me as a beginner.
This is mainly a matter of taste. I like to make my controls in code others prefer the Interface Builder. I see the following advantages for the Interface Builder:
More visual. You can see how you interface will look like while you put it together.
You can use the Preview assistant editor and see you interface without compiling.
You don't have to remember what the options are called because you can scan the checkboxes for what you are searching.
You can faster prototype with storyboards.
Maybe your designer can learn to build the interface using storyboards.
The advantages for code are:
No context shift. All you do is coding.
Still you have less merge conflicts when you are working with a team on a project.
All the options are in one place. In Interface Builder you have to click through all the inspectors to find what you are searching for.
It's easier to post code than screenshots in case you need help on Stackoverflow ;).
If you finde code on github you can see without downloading how the interface is build.
I had a few times that a project could not be opened by Xcode when I opened it in a beta of Xcode because the Interface Builder file structure had been changed.
Code is easier to refactor than storyboards (Thanks #Spectravideo328 for the suggestion in the comments).
It is impossible to inherit from a storyboard scene. I code you can easily make subclasses to reuse code. Using a storyboard you have to make two scenes even if they share 90% of their UI elements.
One thing which is very important: Don't put all you screens in one storyboard. Try to keep the storyboards small. Something between 1-6 screens is working for me with good performance.
There are no such thing like advantages or disadvantages. Just take a example. if you already have those controls to use it via Xcode. why will you code it. We only code things when we need to make special controls or you can edit your controls by connecting your controls to the code(you can google it "how to connect buttons in iOS"). In short, you only create controls when its kind of a special control which is not pre build in Xcode.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I've googled a bit but could not find a simple Image Viewer class to use in my MonoTouch app.
I don't need to show image thumbnails neither a complete photo album (with multiple photos).
I just need an image viewer to show an UIImageView, allowing the common fullscreen/zoom operations.
Obviously such viewer could be implemented using a UIViewController subclass with UIGestureRecognizer, UIScrollView and UINavigationBar trickery, but I don't want to reinvent the wheel. Does anyone know about an open source component available ?
It would also be useful to host such component in the new Xamarin Component Store
Thanks
Here it is.
Features:
Show both big images (larger than the screen) and small ones;
One tap to close view, two taps to zoom in/out. Pinch to zoom is also available;
Scrolling through available content. It's impossible to scroll image outside visible area. Thanks to UIScrollView's ContentSize property.
Suggestions for future:
I reduced code by removing UINavigationBar usage.
Also it's nice to add UIView's basic animation (fade in/out) when user opens/closes full screen image view.
Some relative info:
Solution was strongly inspired by this article.
As a starting point for patching I recommend Xamarin's article.
Any bug reports and suggestions are welcome!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Storyboards and programmatic UIView creation are not particularly good at defining complicated layouts where some items, such as labels, may have dynamically defined heights. I want a simple XML-based layout engine, like a bare-bones implementation of HTML/CSS, that allows me to define a view using margins, padding, border etc. in the DRY manner to which I've been accustomed with HTML/CSS. Is there any open-source library out there that attempts this?
Y U NO wait for iOS6's AutoLayout feature? ;-)
This will allow you to define constraints and dynamic element heights, width, sizes, margins, paddings… with each other elements.
Though it has so many awesome features like dynamic element heights, width, sizes, margins, paddings. I think AutoLayout is too hard to study, edit, merge, maintain.
You can check BeeFramework. It use xml layout as simple as Android does. It has an XML Interface Builder, you can see the UI when you are writing UI code
And the author is working on another project samurai-native.
It uses Native code and CSS. I think it's more awesome than react-native.
I know this is an old question, but in case it is of interest to anyone - MarkupKit is an open-source project I created specifically to address this type of use case:
https://github.com/gk-brown/MarkupKit
It allows you to build native iOS user interfaces using a human-readable XML markup language, similar to XAML or Android. It supports CSS-like styling via JSON-based "property templates" and provides a collection of UIView subclasses for simplifying autolayout.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am trying to learn some of the basics about creating views and view controllers on iOS. All the samples and documentation I've come across use the Interface Builder and NIB files to create UIViewControllers and UIViews. How to create the controller and the UIView programmatically and not use the interface builder?
You may do that, that's for sure. But you should see the pros and cons here;
You create and manage everything in code, neat huh?
Well this means, you will retain/release everything yourself.
You will write lots of boilerplate code just to create a complex view with more than one layer of component hierarchy.
You will not see the properties you may change, instead you need to see the Class Reference document for each component.
You need to play with pixel values a lot, i cannot emphasize how long this "a lot" will eventually be.
So, consider Interface Builder, it is easier to keep everything seperate, and then bind them as needed. Code maintenance is much more important in the later phases, as the app becomes mature.
I have been through both ways, and my vote is +1 for Interface Builder, and override stuff only when needed. That is in practice less than like 5% of your UI development time.
The short answer is that yes, of course you can create views and view controllers programmatically.
As someone who had this same feeling when I first started out, let me impart this short bit of wisdom: Do not try and remove all .xib files from your project until you know a lot more about what you are doing!
There are tutorials out there on how to remove the .xib files entirely from your project, and remove dependency on MainWindow.xib. In my experience it is definitely not worth your time. Just leave the .xib files in your resources folder, close it up and pretend they don't exist.
Eventually, you may even be happy they are still there.
Yes,
You can create UIViewController and UIView programmatically,
See the Apple documentation for UIViewController and UIView, there are many function which start with init, used to create programmatically.
Suggest you to invest some time reading Documentation.