In my UIView am having 4 buttons Like animals,birds,nature``fruits. While clicking the other view shows the set of selected category images. Instead of putting 4 views for 4 buttons i want to perform in single view?Can any one tell idea regarding this??
As per your requirement you take one imageView and on each button click just call imageView.setBackgroudResource(Your_image_from_drawable); in this way you dont need to use four imageView.
Related
I want to make uitoolbar to have separation like this one. But i do not want to use it as background image.
any idea how to do it?
This one is only three section, and if it has four section of course the column will become have four section.
Thank you
You can use 3 buttons instead of toolbar and for separation you can adjust the frame of buttons accordingly. Give it a try. This will look like toolbar.
How could I create this custom tabbar and what does it consist of?
On cocoacontrols.com you can find several TabBar implementations similar to this.
iOS 5 now allows to change the background image of the tabbar but this kind of custom control is much more complex.
You would basically need to write your own view and controller that would change between views, move the arrow accordingly and activate/deactivate the buttons.
As of the elements it consists of, i would say
One background image used for every element
The different icons in normal and selected state
A UILabel for every element
The blue divider
The arrow, separate from the divider to simplify the animations...
To see how a tabbar with an indicator could be coded check out this project on GitHub for a Twitter-like tabbar.
In my app i have a PieChart which has certain divisions denoting different areas or region. Every partition has its own color but there are like 10 partitions and i want to show which part shows which region. It would have been an easy task with iPad as we have UIPopover but here in iPhone i don't know what to do, so i thought if there is any suggestion any one can make. I want to PieChart be visible with the detail about each partition.
Thanks,
You need to make a UIview with tableview and imageview inside it .
You can make your own custom Popover type control by making a UIView then adding the desired elements to it and making it as a subview or keeping this view hidden from the start then making it visible on button press.
Here you will find many popover controllers http://cocoacontrols.com/search?q=popover
I want to display like 9 thumbnail (arranged in 3x3) images in a View Controller.
Then when I touched on one of the thumbnail images, it loads another View Controller,
to display the details of this specific image, like date taken, description of the photo.
I have checked out Three20 project, but im not sure if this is the only way to go?
Are there other ways to do this without using the Three20 project?
Thanks!
There are many ways to do that.
the simplest ways I can think of are:
create a view that holds 9 UIImages and add a gesture recognizer to the views, create a view to hold the deatils and call it each time a view is clicked.
create 9 buttons and set the images to the buttons, reate a view to hold the deatils and call it each time a button is clicked.
pretty strait forward.
good luck
shani
I am new in iphone.I added 10 buttons on the scrollview.Buttons are scroll properly,but only 5 buttons are working last five buttons are not working.please suggest me what i do next.
It sounds like it could be one of two things
Either ...
There are no associated actions with the buttons (programatically or in IB)
There is another view that is covering the buttons and taking all the touch events
Try swapping the position of two of the buttons (one working and one not) and see if they continue to work as before. If they do, then it looks like the actions are not set up. If they have now changed, then there is an issue with where the buttons are placed.
I also have faced such problems...I also think there will be another view which is covering that button and their touch events....