Any potential issues using uitableview and uiwebview to show mini google map - ios

Im looking into having a tableview and a custom cell that has a webview control. The purpose of the webview would to show a google map inside the webview at some lat/long.
Could there be problematic with this approach? Memory issues?
Another approach would be having a uiimage and use the google map static api to generate the image and store the image on my server and have the app request the image via a URL.
I was hoping to avoid generating the images and storing them on my server and using directly the google map in a web view, but not sure what kind of issues i could run into with this approach?

The only problem is speed. If your table view consists of rows and rows of MKMapViews, it will take time for each one to load as the user scrolls through them. However, if there is only one it shouldn't be a problem.
The static image approach has the same problem but I think it might be slightly faster.

I have an app in the App Store for a local festival that had many events at different venues. Given that the audience was from all over the world, and thus unknown in town, the app showed a map for each event. I solved this using an MKMapView inside a custom UITableViewCell and using an accessory disclosure button that would push a detailed map view onto the navigation controller. It worked well, but was a little slow. I would not recommend it for many such cells.
Screen shot:

Related

How to Make a Programmable Tile View (Like the App Store Has)?

I'm building an app, and I want the main view to be "tile" based, kind of like how the App Store looks:
In other words, I'd like to be able to add rounded "tiles" (like the get fit, now trending) to my view with certain information- a method that adds tiles in certain scenarios, with certain information. I'd also like the view to be scrollable, and the tiles to expand and reveal more information when clicked.
I have no idea how to start this, so I'm sorry for the vagueness, but any help is appreciated.
Anyone looking to make a UI like the App Store's today page will find what they want in the Cocoapod called "Cards."

Creating webpages thumbnails in swift

I am trying to code a "webpage selector" on my app, using a fancy carousel to display the webpages thumbnails.
However, I don't want to display the webpages thumbnails as webViews on my carousel because I can get quite a large number (20-30) of webpages at the same time and loading all of those can cause a lot of lag.
So, I decided to use screenshots of the webpages and use those images to populate my carousel instead, making the carousel animation much smoother.
Here is my question:
I would like to know if there is any way to take a screenshot of the webpage (without showing it on the app screen) and save the image into a list that I can use to populate the carousel.
I am aware of this question but is quite an old post, so I was wondering if there is another way to do it. Also, I tried to implement the suggested solution, but it did not work.
You can create a WKWebView that is behind your view controller (and thus invisible) and constrained to the size that you want. Once the page finishes loading take a snapshot by using drawHierarchy(in:afterScreenUpdates:) inside of a UIGraphicsImageRender and save the resulting image as your thumbnail.

Using PageViewController for a large number of pages like camera roll image view?

I am trying to create an app for which I need a way to swipe through views. For example, while swiping through images in photo stream or camera roll. I DO NOT need to swipe through images however, I need to swipe through UIViews. I have been looking at PageViewController. However, setViewControllers:direction:animated:completion: suggests that I need a ViewController for every UIView. This doesn't seem to be what I want since I will have over 40 views that I will need to scroll through. I think I'm missing an obvious ios feature here since even iBooks has a way to go through pages of books.
I was thinking maybe having 3 ViewControllers and changing their content whenever I swipe across. But that seems very roundabout.
Please help me out!
Thanks!
Apple has provided a fairly robust example of doing this kind of thing with photos called "PhotoScroller" at http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html. It uses UIScrollViews and CATiledLayers to recreate the experience of the Photos app. You may be able to modify it to work with your UIViews instead of images.

iOS - How do apps like Path optimize their table cells where every cell is (almost) different?

So here's the issue i'm currently running into.
I have an app that shows a Facebook/Path like feed with a UITableView. Let's say that my datasource has about 200 items and not all cells have the same content and cell height. Some have images and some don't. I was able to overcome the scrolling performance issue by initializing my cells with a reusable identifier in the following format: [NSString stringWithFormat:"entry_%d", some_id]. Things were going really well up until I started using the UIImagePickerViewController. As you can imagine I've been receiving a lot of memory warnings due to my large datasource/table.
When playing with the Path's app and trying to load as many data into a single view; they do a really good job at both the scrolling performance and memory management. Their app also doesn't crash whenever I go into the camera mode.
Any thoughts or theories?
Thanks! :)
I highly suggest you check out the Facebook iOS framework which reimplements the table view. The name of the framework is Three20, and you can find it on github here.
With that said, if you have a very large table, you need to be careful to only load resources for those things that are in view, and release resources for items once they go out of view. The delegate method tableView:didEndDisplayingCell:forRowAtIndexPath: (available iOS 6 and later) is your friend for that. Here is another question related to this topic.

A UI control for Ipad to brose a list of images

I have made the decision to use monotouch to develop an application that browses an rss feed and displays a grid of images much like browsing the picture library actually on the device.
My issue is that I have NO idea (even after extensive googling) as to what control I should use.
I want to be able to swish through the list of images which I really wanted in a UITableView BUT all documentation insists that UITableView only has 1 column :(
I dont want to get too complicated with my requirement at this stage for unloading and loading resource as the images go off screen but if anyone has any pointers for me in starting this and what control I should go for I would be grateful.
My initial thoughts are perhaps having n images in every cell and the cells are very wide (would an ipad only display those it can and automatically allow swiping to the others off screen?)
Many thanks
Richard
The UItableView is only one column, but you can define the UITableViewCell to your own class and allow any number of elements across it.
As to whether something goes off the screen, that is entirely down to your application.
Have a look at the developer videos on iTunes, especially the beginning table views sections, that should point you in the right way

Resources