I am using a UIwebview in my iphone app. It is working fine. No memory leaks when you browse websites, g开发者_如何学编程oogle, news etc. But when you start a video in youtube then it shows me many memory leaks (Under AudioToolBox library). How do I fix them. I imported AVFoundation.h and audioToolBox.h and added these frameworks but I am still getting the same problem.
One more thing, I know apple checks no connectivity condition. Means when there is no internet available or connection problem then user must get some message about connection issues. How do you do that? How do i check internet is connected? what kind of message do you show? Alert or something else?
Do I also need to show activity indicator? How do you show that? can you please reply with sample code?
Apple's designated way of checking connectivity is "try it first". If you get connection problems, you can diagnose with their Reachability suite, available here. But always try first, because Reachability can give false negatives in some situations.
As far as UIWebView's memory problems, I don't think you're in a position to do anything about them. Hope they get fixed in iOS5, I guess. If you want to use AVMediaPlayer for rich media, like Safari and UIWebView do, use it directly, rather than going through WebKit.
精彩评论