i am just developing some simple app which show the periodic table but my problem is how can i achieve the periodic table like layout in my iPhone app in just landscape format.
i have tried to search some CustomGridLayout sdk for IOS but not suitable for me
have goggled the things but not succeeded
following is the reference of periodic table layout which i want to implement
There is a couple way to do this:
1) You may use UICollectionView with custom cell. for this.With cell size equal element cell. But you will hit a several problem here: Some cells should be disabled, and customized in non standard way. In this case section is not useful for you. Overlay button in top on collection view may be difficult to positioning in storyboard.
2) You can use UIContainerView with totally custom view and colors. Dynamically added to custom row and column. This ofc have some flaws. Harder to build layout in storyboard (compared to (1) solution), memory management issues.
Related
I have a NavigationController that stacks UIViewcontrollers that have UITableView among other UI elmeents. The tables I use are actually custom tables that use custom cell views. With this arrangement those tables don't show scrollbars of any kind even though I have configured in IB the Shows Vertical Scrollers to show them.
I've tried several ways of debugging this without success. If I print to console the value of this property (showsVerticalScrollers), it prints 1, so the property is properly set, and no, my table is not wider than its parent view, actually it's way more narrow than its parent view.
Are there reasons why a table won't show it's scrolls?... btw, this happens in iOS5 running in simulator. I'm using xcode 4.2 with SLeopard. I don't have access to an iPad to test it in the hardware but other tables I have in the same project, show their scroll bars without a problem.
EDIT
thanks for the answer... I did one last test and found that one of the causes for not showing a scrollbar is the number of elements shown in the table, when they fit in it without the need to actually scroll. Say if you have a table with 1 row and the vertical size of the table is too big for just one row?, then iOS won't show the scrollbar when bouncing.
It's hard to provide a possible solution without seeing any code, but the advice I can offer is to update your code to the bare minimum needed code to implement a UITableView and see if scrolling works, if it does, add in functionality in small increments, testing the scrolling with each new code addition till you reach the point that scrolling breaks. Incremental testing in this fashion helps to avoid issues like this where you are unable to effectively debug your application.
I'm an iOS developer looking for a solution to a tricky problem.
I need to create a grid view/ mosaic view to layout cells of different sizes (both width and height).
I basically need the functionality of a GMGridView, with horizontal scrolling/paging, the ability to edit, and drag cells to new locations, thus rearranging the entire grid view. I've looked at all of the current open source grid views out there, and found none with variable sized cells.
One solution I have thought about is 2 tableviews both rotated for the horizontal scrolling, and then intercept some UITableView scrolling methods, to then scroll the other tableview together. This is not ideal, as I will be unable to move a cell from one view to another, and I'm not sure how happy apple will be about it.
I also know of some possible (confidential?) support for this coming in the next version of iOS, but would like to keep my app supporting previous versions of iOS.
Thanks for any insight you can provide.
I realize this post is kind of old, but here is a list of relevant projects: *https://github.com/betzerra/MosaicUI
*https://github.com/betzerra/MosaicLayout
GridViews on iOS are a pain. Fortunately Apple is coming up with UICollectionViews that are optimized to build grids. This is coming in iOS6 and it's still under NDA so check out the documentation on Apple's website for more information.
The question you need to solve now is whether you want iOS5 retro-compatibility or not
(source: kominetz.com)
Hello. I'm diving into iOS development and am building my own alarm app to become familiar with the SDK. My questions are...
I've played around with UITableViews a bit, but I don't understand how I would implement the table at the top half of this form. If I had to guess, I would say it's a single UITableView, defined with one section and four rows, is that right?
If so, to implement it, would I just "hardcode" the cellForRowAtIndexPath function to create each cell manually?
If not, is there an adopted approach to defining the layout and functionality of these types of settings pages?
Row #3 has a switch in it, is this a predefined cell style or a custom cell style that I have to define myself?
Rows #1, 2, and 4 take the user to new views when they're touched. Is this a predefined style and or do I just implement the standard didSelectRowAtIndexPath functionality to push a new view onto the stack?
Thanks so much in advance for your help! I'm going to continue researching these questions right now.
In answer to your questions:
Yes
Yes
n/a
No, you have to add a UISwitch to the cell's contentView. Tip: Look at Apple's UICatalog sample code (controls sections) to see how to implement a tableview with different controls in different rows.
Just use didSelectRow...
For most apps, you want to implement the Application Preferences settings plist that will be used by the device's Settings application. It's typically a good idea to keep the settings for your app consistent with how the settings work in other apps.
In reference to my previous question, I would like to know how to implement a large grid of cells in an iPhone application.
I'm working on an interface which would be similar to an Excel spreadsheet, with many rows and columns. Do I have to handle each cell separately? How can I handle user interaction in each cell?
Is there a standard way to create this type of control?
There is no real standard mechanism.
If all of the cells in a given row will always fit in the width of the screen, one way to do it would be to create a UITableViewCell with several UILabels and vertical separators between them. If all of these rows had "columns" of the same width, you would get the appearance of a grid.
If that isn't possible, it might be helpful to think about what the table view control truly is. A table view is just a scroll view that automatically adds, removes, and recycles its subviews so that only the ones that are visible at a given time are in memory. There is no reason you could not write a GridView control that did the same thing, but in two dimensions. It wouldn't be as easy as using the built-in table view, of course, but if the table view can't do what you need, well, that's why Apple isn't writing all the apps.
Sounds like the exact thing that UICollectionView was made for!
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UICollectionView_class/Reference/Reference.html
Look at my answer to this question: MS Excel type spreadsheet creation using objective-c for iOS app.
Basically there's no standard way to do this. You will need to made everything by hand and there's 3 ways to go:
Use a UIWebView and layout everything using html/js.
Modify a UICollectionView.
Make everything by hand using Core Data.
I wanted to generate one fix view using interface builder, but the size of that view is exceeding the size of iphone screen,and I am not able to maximize screen. I wanted to show table view in that screen.
I did enabled scrolling but that didn't work,
Update 1:
Actually I wanted to show thumbnail image inside cell and i want to show 5 cell so 5 thumbnail image,those images are static. So which is a better way to achieve this ,interface builder or programming?
Hope this is clear enough.
Your question is not terribly clear, so this is the question that I am attempting to answer here:
You want to have a table view which has five rows, each of which has a small image.
Short answer: you can't do this entirely in the Interface Builder. What you can do is define your table view, including the "look," scrolling abilities, etc. And then in the same XIB file you would define the table cells (which can include your pictures, captions and what have you).
You then have to connect the two together programatically. Apple provide plenty of examples in the SDK on how to do this.