Grid View with UIPageControl in iOS 5? - objective-c

I know there are plenty of Grid Views out there for iOS and Objective-c, but I couldn't find one that fits me. Currently I use a grid view called UIGridView. It included only two files and was very simple to implement. However it cannot have more cells than it can fit on the screen. I want a dynamic grid view where I can have a UIPageControl to have multiple pages with cells. I like the UITableView but for this project it would be more efficient to have a grid view.
I currently use this grid view: http://www.chupamobile.com/products/details/380/Interactive+Grid+View/
Is there a simple grid view with page control? Or can I put my current grid view in in a UIPageControl?

Did you try CHGridView at https://github.com/camh/CHGridView ?

I settled with the MMGridView. It has horizontal page control scrolling. I just modified the cells to my liking. You can find the git source here: https://github.com/provideal/MMGridView

I am currently using AQGridView so surely i recommend that as it is the least buggy and its functions are very similar to UITableView.
Also that If you are trying to do this without XIB it will be little bit difficult for you to handle it but you can create a view controller with Xib file to Create the interface of your choice. Here is the Video of how it can be done in the best possible way by Evadne Wu. And here is the Sample Project
Now for the Paging Control
in AQGridView you just need to set Paging Enabled and it will automatically do the rest. Hope that helps.

Related

Google play like slider for ios?

Im trying to create a uiview horizontal touch slider. Similar to how the google page store is designed on android. I was thinking i would just put a bunch of uiviews (as pages) inside a single huge uiview and just drag the uiview along on touchevent. But i also need to detech which is the active view to perform post requests and itd need to loop. Any suggestions? Tutorials?
I think the appropriate answer for your question would be "Horizontal UITableView". Checkout these code shared on GitHub.
EasyTableView
Another Example for Horizontal Table View
You can design cells as per your need to show. Also you will get each active cell when you click it in didSelectRow.
Hope it works for you.

Is there a tutorial somewhere about designing a really large view and put it in scrollView using storyboard

The question may be similar with
Designing inside a scrollview in xcode 4.2 with storyboards
but none of the answer there makes sense at all.
Okay I created a new controller and I added a scrollView.
The very first thing I noticed is there is NOWHERE to specify the content size of the scrollView.
Not in attributes inspector, not in size inspector.
Then what?
I am expecting some larger than normal box where I can draw all the view I want to put in. There is no such thing either.
I am very frustated.
All the "tutorial" out there tell about how to fill scrollView using code.
Another thing I tried is to select controller go to size inspector and then choose FREEFORM.
Great. I still can't make that template big.
Should I do this in XIB instead? At least on that one I can have one huge UIView. Or what is the official way industry standard way of doing this? Is there a WWDC for this one?
Say I want to draw something like these:
I don't think you can get a tutorial on this as it is simply impossible in IB. As most people already commented out what you want to do here need to be done programmatically.
If you are using XIB you can set up all your content there. Under the size tab (in the inspector) you will need to change the height to fill all your content but you still need to set up your contentSize programmatically.
For storyboard I don't think it is possible to change the size of your scrollview in IB.

How to draw in code an imageview

I have a problem. I want for each record in my core data database to draw an UIImage view on screen. But the problem is that I want to make a sort of grid. On the link below you see what I want to achieve.
picture
So my question is, how do I draw an image on screen in code. And place those images in a sort of a grid. using a collection view is no option, because the app should be running on all IOS devices.
While you could implement a custom UIView and implement the drawRect: method and draw UIImages there, I suggest just using multiple UIImageViews as subviews on your "main" view. Your view might be embedded in a UIScrollView, or you could use a UITableView with custom UITableViewCells. Whichever is easier is probably related to how you can interact with the view.
Building that one huge image view is something that I'd definitely try to avoid - it costs many many (probably unnecessary) memory, and it might be slow as well. Definitely not very flexible to handle, and a pain to update dynamically.
A quick cheat for something like this is to use a Table View and then in each cell to place another TableView but rotated at 90 degrees.
You can then use this second TableView to display the pictures etc...
This will give you a table that scrolls up and down and then each cell can scroll left to right.
I'd suggest subclassing UITableViewCell and setting it up as a UITableViewDelegate and UITableViewDatasource.
You will also have to remember to rotate the content of these "sub"tables by 90 degrees also so that they are the right way up.
This sounds like a lot of work but if you push the management of the sub Tables into the cells then it actually becomes quite easy.

Creating a Table with Rows and Columns in iOS

I would like to create a table in iOS that have some rows and columns. We also have an option to add amounts to the table. A screenshot of the sample table is posted below:
The cells needs to be editable. Is there a way to implement this using the default UITableView in iOS. Or Is it a good to create it using buttons or textfields etc?
It would not be an easy solution but you can use a rotated (horizontal) UITableView inside each cell of a table view (vertical) just like the Pulse app. Using only labels makes it easy to manage but the "excel" look could be harder if you're planning handling events like selecting rows, sort...
Here's a two part tutorial on how to use horizontal tables (http://www.raywenderlich.com/) :
part 1 - part 2
In ios6 you can use a UICollectionView with a UICollectionViewFlowLayout to archive this. A UICollectionView works very similar to a UITableView, but gives you more control over how the cells should be displayed and aligned.
There is an open source solution on GitHub that supports iOS 4.3+ if you are still looking for options. I haven't actually used it, but it looks like works like UICollectionView.
PSTCollectionView
I created a table structure similar to this using tableview and scrollview .Think that could be helpful to you
You could get the sample project here
https://drive.google.com/folderview?id=0B-brvnZfBXwTU21VbmNNcnRSU2M&usp=sharing

Simple slideshow in a UIImageView

I got trouble to add slideshow to my application.
Currently, I have a UIView composed of a segmentedControl.
I made ​​two "views" that I hide or display depending on the selected button.
I'm looking to make a simple slideshow in one of my two views. I made a UIImageView because it is simple to display pictures.
So I'd like to display my pictures one by one and it is possible to move from one image to another by sliding your finger to the right or left (just as in the native app "Photos").
I tried to adapt example codes from the documentation, but without succes.
So I'ml looking for help.
Thanks,
jb crestot
SO, I've actually done this and it's fairly easy. The ingredient that you are missing is a UISCrollView. My implementation did exactly what you describe (allow the user to go back and forth between a set of images).
Basically, add a UIScrollView to your View in interface builder and you will be creating the UIImage views with code (a simple for loop) and setting their images the same way. I did this safely with no memories issues with about 15 images (PNG's). There could be a potential performance issue with this message if you are working with a large number of images (say 40?)
I hope this helps, let me know if you need a code sample to see how this works.
You may consider using a custom class, such as iCarousel, linked below. Each of these views could be your image, and then tapping on them could launch a fullscreen view for example.
Keep us posted!
http://cocoacontrols.com/platforms/ios/controls/icarousel
See apple's page control sample application.