Which UI they used for CNN application in iPhone - iphone

I'm getting stack in the design UI for an news application, i just want to make a transparent image under the 1st cell in a UITableView, and the Bar Menu on the top also transparent, which control they used for this one, like the below image
http://i.stack.imgur.com/C1C8N.png
Could anyone help me....
Thanks alot!!

I think it is a UITableView, where the first cell is customized in order to contain the large image. Then, they might be using a UIScrollView as the view for the first section, or a custom header view for the whole table - depends if that top stories "scroller" scrolls together with the rest of the talbe.
The rest is a "traditional" combination of a tab bar and a navigation controller.

Related

make view controller scrollable with collection view

I need to create a view controller like this or like user instagram's profile
not exactly same, I just want to add label and buttons and collection view,
but I want all of this in scroll viewController
I think I can't do that from storyboard, so how I can make a view controller scrollable programmatically?
and then I want to add the label and buttons inside the scroll , I can do that programmatically , but how I can add collection programmatically inside it?
One of the possible solutions is to make the whole container a "UICollectionView" -or "UITableView", depends on what exactly you want to build-, and then, create a custom cell for each area depending on what do you want to display in it.
It might sounds a little bit strange in the beginning, but you will notice that it is a great technique to handle scrolling in your scene, including some of extra nice features, such as:
auto scroll content resizing for "UIKeyboardWillShowNotification" and "UIKeyboardWillHideNotification" events.
the ease of showing and hiding sections from the UI (actually they are cells!).
UPDATED: For example:
You can make the first part (red rectangle) as a UICollectionReusableView and customize it by adding your images and button in it, second part (blue square) as a UICollectionViewCell and so on...
This is the general idea of what how you can do it.

How to build this screen in iOS?

I'm new to iOS development and am trying to build something like the screen below:
If I was doing it in Android, I can easily build the above UI in a few minutes. However, I don't know how to go about it with iOS.
I understand that the whole ViewController can be embedded in a navigation controller, which produces the title bar above. What about the bottom part though? I'm thinking of using something like a grouped UITableView but I'm not sure, since every cell will have very different contents:
A search bar, perhaps a subclassed UISearchBar, which I also don't know how to customize--the Search button at the right is required but isn't in the default UISearchBar. When the user taps on it, the UISearchBar must be translated to the navigation bar, no need to display a UITableView of suggested results. I don't know how to do that, too.
A button that, when tapped, flies in a modal from the bottom (I imagine it to be another ViewController with a grouped UITableView), to allow the user to choose from defined locations. Once selected, the modal closes and the button text is replaced with the selected location. This sounds much easier to do.
A header ("Item categories") and the list of categories, which may change in number. If the parent isn't a grouped UITableView, I think this part can be a UILabel and a non-scrolling UITableView with a height that changes depending on how many cells it has. If there are plenty table cells that don't fit given the screen's height, everything below the navigation bar can be scrolled vertically. That, I also don't know how to do.
If anyone can just guide me to what native iOS components I can use to build the above screen, and maybe a couple of tutorials to the things I just said I don't know how to do, I'd appreciate it.
You said it right .All the basic info you need is with you.
To build a searchbar like that i dont think you have to subclass it.
Bottom comprises of tableview.
Actually these Questions are seperately available in SO itself.So search seperately for your needs and you can achieve whatever you want
One basic principle : You cant achive anything by just thinking.Trying and get to it and if you have any issues look forward at it.All the issues will have an answer on the way.
Lots of components you need there.. Search Bar, UIPickerView and UITableView. I would like to give you some pointers.
1) You can refer http://www.appcoda.com/how-to-add-search-bar-uitableview/ for Search bar
2) When clicking on the Button, you can bring up a UIPickerView instead of another controller. For that you can refer http://www.techotopia.com/index.php/An_iOS_5_iPhone_UIPickerView_Example
3) You can use a normal Tableview with a single section, configure the section header to display Item categories.
You are asking too much to ask how to do every component of your UI. I will just answer a little.
Yes, a grouped table view is a good design. I am using a grouped table view for varying types of input. I have an actual table, with rows that can be added, and deleted, and contain an editable text area. Then I have three groups that only really show one piece of content each: two are sliders and one is a switch.
For choosing the location, pushing another view controller on your navigation stack would be the more typical way to handle it. You will save some effort that way, with some buttons and behaviors built in, but a modal view controller is not much harder. I'm not sure if you can make a navigation view fly in vertically, but does your app have to be frame-for-frame identical to the android version?

UITableview with UIPageControl?

I am in the making of a restaurant "step by step" ordering app, where I want to list the menu (appetizers, main course etc) in a tableview with the ability to organize the menu contents with a UIPagecontrol. Something similar to the eat24 app way of doing it or how the weather forecast app is constructed.
I already have the tableview set up, now I just need to implement this, which I hope you will help me with or guide me in the right direction, for me to accomplish this :). Would I need to setup a tableview for each of the categories or would it be possible to just update one tableview with the needed information, by swiping to the left or use arrows in a toolbar in the picture? What would the best way to add a toolbar like the one picture (white ring), using the storyboard -> resize tableview and drag the image in or to set it up programmatically?
Option 1 - Updating your tableView
You may update your dataSource so it reflects the state of the "new" tableView. Than you call reloadSections:withRowAnimation: by using UITableViewRowAnimationRight or UITableViewRowAnimationLeft, depending of whats fitting at the moment. This will feel like scrolling to a new tableView. For swiping you could use a UISwipeGestureRecognizer.
Option 2 - Using a scrollView with multiple tableViews
If you want it a little bit easier just setup three tableViews and throw them in a UIScrollView with paging enabled.
PageControl
Of course you need to add and setup a UIPageControl, if you want to show those dots.
Regarding the UI:
You can setup everything in your Storyboard. The background, the arrow buttons, the UIPageControl, you can even add the UISwipeGestureRecognizer within the Storyboard.

Mimic ABNewPersonViewController UI

I'd like to replicate the iOS 4.x ABNewPersonViewController UI layout (see link text) in a custom view but I'm unsure about the best way to achieve this. I was thinking of a single grouped UITableView, but what about the first section? How do I achieve the smaller cells (first,last,company)? And finally the "add photo canvas" is it just a sub UIView with a background image for the shadow and the rounded border or can this be done programmatically?
Many thanks in advance!
your idea about a single grouped UITableView could work. The way to get the smaller cells as well as the photo cell would be to subclass UITableViewCell and create it like that. and yes the photo canvus is just a custom UIView added on top of the UITableView. I'm not sure i see the point of rolling your own here, but thats how i'd start. Also i think i recall seeing a tutorial on how to build this page..try googling for it.

Multiple UITextFields grouped together like a UITableView section

I'm looking for a clean way to implement a login screen in my iPhone application. I'd like it to appear as a grouped UITableView section with rounded corners and a separator line below between rows (like e.g. the sections in the Settings app). However, I'd like to give it a slightly smaller cornerRadius than the default setting of a UITableView section.
Another thing I'd like to do in that screen is to add a "register as new user" button which causes the whole screen to slide up, presenting the registration screen. There will be a background image that spans both screens vertically and should slide up with together with the content.
I was first thinking to just make a UITableView, set it to grouped, add two sections (one for login and one for registration), add some space between them and disable manual scrolling on the UITableView. However, I found that putting a background image correctly behind a UITableView and to make that scroll together with its content is a bit tricky..
Perhaps I shouldn't be using a UITableView and just write some code myself that can wrap multiple views (each containing a label and a textfield) together into something that appears like a UITableView section? I've been searching around but surprisingly it appears that not too many others are trying to solve this same problem.
Any suggestions would be very welcome!
Sounds like a UITableView is overkill for what you need. I would just create a custom UIViewController and have it handle the layout of all of your subviews as well as any animation you desire.
Just have the parent view take up more space than the device's screen. Then, when you want everything to slide up, animate a change to that view's frame property.