iOS Create iBook like interface inside UITableViewCell - iphone

I need to display some content inside a grouped table view. At the same time, a cell inside my table has content that exceeds its bounds. I do not want user to scroll to view the entire content.
As an alternative, I want to make this cell such that it has a paged view - the pages are created on the fly based on content length. I will use its backgroundView property which will lay out as pages.
I found UIPageViewController but its design is too complex just for my one cell. Also I could not grasp many parts in it.
I found this library named Leaves but I am not sure there are many examples that have used it successfully. I do not know what I would need to modify in it so as to fit it inside my single cell. The example that is given with it successfully shows PDF and Image along pages, but there is no example of plaintext rendering.
Any pointers? Any other sources that can suit my purpose?

Why don't you use the cell view that would resize itself according to the text contet. So if some cells have larger text content and some have smaller text it would automatically resize the cell. Here is a two part tutorial that does exactly the trick you are looking for. Hope it helps you out.
http://www.raddonline.com/blogs/geek-journal/iphone-sdk-resizing-a-uitableviewcell-to-hold-variable-amounts-of-text/

Related

Eureka - Custom Inline Row

I am trying to write a custom inline row using Eureka but I couldn't do it by following the documentation in the Github page of the library.
Also I copy-pasted this answer but it throws a segmentation error. I also tried searching for tutorials on the internet to follow but there is none.
Can someone clearly and basically explain how can I do this?
See if this is the place you want to look into
Also, are you using this library just to do a collapsible cell? You can do that by yourself and that is really not hard & a lot of code to implement. Check out this exmaple. All you need is to define child cells and parent cells in a section and reload it with animation!
I know it's a long tutorial. You can probably skip the top half, and start reading from Expanding and Collapsing section. The basic idea is, a collapsible cell and the collapsed cell are within a section, and you have a variable per section of cells to remember if the section is expanded or not. When clicked on the first cell of the section, if it's already expanded, reduce the cell count to one and do a reload to this section using animation Fade. and vice versa. This Fade animation will produce the animation you want.

iOS white background behind settings controls

Is there a control that can achieve the appearance that is in this image?
It looks like some special single round cornered table cell a UISlider embedded in it.
What I am wondering is it really a table cell, it seems overkill to do this. Is it possible there is something in iOS to achieve this without using an UIimage as a background.
Thanks,
-Code
Looks like a grouped table view section with one view in it. That custom table view cell in the grouped table view section looks to have a UISlider with a UILabel on either side of it.
As a general rule, you should always lean toward using the standard built in controls unless you really need a custom look.
See the third image here: http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/AboutTableViewsiPhone/AboutTableViewsiPhone.html
Also:
http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/TableViewStyles/TableViewCharacteristics.html
From that link:
Grouped Table Views
A grouped table view also displays a list of
information, but it groups related rows in visually distinct sections.
As shown in Figure 1-4, each section has rounded corners and by
default appears against a bluish-gray background. Each section may
have text or an image for its header or footer to provide some context
or summary for the section. A grouped table works especially well for
displaying the most detailed information in a data hierarchy. It
allows you to separate details into conceptual groups and provide
contextual information to help users understand it quickly.

Editable UITableViewCell having a left-aligned label

I am very new to iphone application development and am struggling to create a table view page where each row contains a left-aligned label with an editable text next to it - just like how it works in the email account details page in the settings application on my iphone.
I have been googling the subject for hours and it is now somehow clear to me that I need to add UITextFields to UITableViewCells, but it is still not at all clear to me how I make these text fields take up the right amount of space:
How do I make the text fields align above each other?
How do I make the text fields expand as far as possible to the right?
How do I prevent the text fields from hiding part of the left-aligned label?
Read the Apple Docs on Tableviews there are a number of predefined table cells. Also look at the Tableview programming Guide. Pick the one that has the font characteristics that you want and Apple will take care of it for you. Also, in the Settings app, the settings are a Grouped style.
For the look you are describing I think it is called UITableViewCellStyleSubtitle.
You need custom UITableViewCells and there are a number of ways of making them. For your purposes, any one of the techniques detailed in the Apple documentation will probably suffice.
An alternative to those approaches is in GSUtils (full disclosure: open-source library written by me), where you can use the same approach to designing your table view cells as you would design a UIView.

What's the best layout for a scrollable iPhone "detail view" with variable content?

I'm building a navigation controller based iPhone application and am curious how to go about building the detail view for my application. The part that's complicating my endeavor is: What UI elements/hierarchy should I employ to create a variable-height yet scrollable detail view?
A great example of my goal is an arrangement like the mobile App Store detail view. The horizontal divisions between the heading, description, screenshot, etc leads me to believe it's a table view in disguise, but that's just a guess.
Currently, I'm using a UIScrollView for my detail view, but since I can never be sure of the exact length of my incoming content, my description view ends up with either unused space or truncated text. Is there some set of elements that would be best suited for displaying this variable-height content in "blocky" format (like the example) while still maintaining overall view scroll-ability?
Thanks in advance for your assistance!
If you want to be able to easily format complex content you can use a UIWebView. What I basically do is create an HTML template and add it as a resource. At run time I load the content of this HTML doc and do string replacement to add the content I want. Within the HTML I place placeholders like
<div><!-- ARTICLE_TITLE --></div>
I don't think the App Store detail view is a UITableView. In fact, I'm pretty sure it's a subclass of UIScrollView.
To determine the size of your content, you can use NSString's sizeWithFont method.
A little late, but still relevant: The App Store broke a few weeks ago, and the "Featured" tab of the App Store was very obviously HTML without CSS applied. So, it's actually a UIWebView, or web content displayed in some fashion.
The touch-down behaviors of the iTunes app, while appearing quite similar, behave differently, in a more native fashion. I'm not convinced this app is implemented in the same way.

How do I create a rounded table with controls in the cells?

I'm exploring the iPhone SDK and want to create and use a UI component like the figure below. A rounded table with cells in which each cell can have some label text, maybe an input text field and an action button that would take it to the next screen. The table should not be screen filling.
But... I can't figure out how to do it or find example code. The 'Table View' always seems to result in a screen filling table and although the 'Table View Cell' looks like what I need I can't find any good examples. I'm sure it's all not that hard, but I just can't find it. Any tips, pointers are appreciated.
(This figure is just an example of the sort of UI component I'm looking for, I'm not build something related to flight tracking...)
Table like component http://gerodt.homeip.net/table_ui_component.png
Gero
Try looking at the "5_CustomTableViewCell" project of the TableViewSuite code sample from Apple. It should how to create custom subclasses of UITableViewCell.
The short answer is, as alluded to above, you'll want to subclass UITableViewCell and add your custom UI elements to it. For the example you provided, you'd want two different types of cells; one with a label (in light blue) and content (in black) for 4 of your cells, and then a more complex one with additional text on the right.
You want a Grouped style table, which has sections with rounded elements as you lay out instead of filling the screen.
You also want custom table cells, which you can search here to find example code for.
As mentioned by other answers, what you want is a grouped TableView with custom UITableViewCells. Take a look at the Table View Programming Guide, in particular this section on table view creation and this section on custom cells.