Issues with map behind UIView, similar to FourSquare venue detail
Asked Answered
H

4

3

I am currently using this excellent solution from @yonel to make something similar to the FourSquare venue detail page. Within my storyboard I have this:

enter image description here

The problem is: because the scroll is a bit laggy, when I scroll fast I get a "Received memory warning." message in my console. The curious thing is that if I remove all of the labels and buttons inside the UIView (just below the Map View), everything works fine.

Any idea what could be wrong?

Haslett answered 20/4, 2013 at 18:19 Comment(0)
H
2

As the above posters mentioned, it is difficult to give you any authoritative information without actually seeing some code for your project - and I'm aware that you have already found a workable solution. However, in case other users find this question with similar responses:

The nature of the error message suggests that you probably had some kind of memory leak in your application. The best way to start debugging this kind of problem is to use the Memory analysis tools found in Instruments.app. For some detailed information on how to do this, take a look at this link from the Apple Developer site.

Especially if some of the items which are scrolling on or off the screen have graphical information (background images, etc) associated with them - destroying things which are off-screen might help improve performance. You will, of course, then have to re-create the items in question when they come back on-screen.

If the above doesn't help, take a look at some of the following questions/answers, which provide insight into other problems where this error occurs. Perhaps your issue is/was related:

Hydrastis answered 29/4, 2013 at 20:7 Comment(2)
Even having solved my problem with another library, I tested it with your solution and solved the old problem. Thanks anyway.Haslett
Oh awesome. :) Glad to hear that the research helped, and thanks for the bounty!Hydrastis
H
1

Unfortunately after days of searching, I could not find a solution. But I managed to find something to replace what I have, using UITableView.

I found this ParallelView for UITableView: https://github.com/zhigang1992/ZGParallelView

Thanks for all the answers.

Haslett answered 26/4, 2013 at 13:10 Comment(0)
D
0

I'm not familiar with the Venue Detail view in Foursquare, however I don't think we can help you with this without seeing some code.

At a glance, I notice there's another view there you haven't expanded. Perhaps something heavy in there, but again I think you need to show some code for those views, cause its more likely you're performing some memory intensive task and that's causing the issue.

Preferably if you could the scrollViewDidScroll method too :) I'll do my best to take a look once you've posted something. Or you can contact me directly with sample code if you don't want to post it here publicly.

Debenture answered 26/4, 2013 at 9:12 Comment(0)
Y
0

Received memory warning ,this warning displayed in the console once when i was testing in device .But when I closed the idle apps the error went away.So try removing apps running in background and try again .If it exist I think the issue is that when you use the scroll some kind of memory leak from the map tiles or something. Use instruments and analyse if there is some memory leaks.

This may help you

memory-management-in-objective-c-tutorial

Yetty answered 26/4, 2013 at 9:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.