I have been following a iOS tutorial on raywenderlich.com, called "How To Create a Simple Magazine App with Core Text" LINK
The App works great on the simulator, but when i build it for my iPad 1G, the scroll view is not fluent at all, the performance goes down, and the view becomes useless.
I have been trying to get help at the raywenderlich.com forum, but with no luck.
Is it a general problem with Core Text or what do you think?
Thansk
When trying to debug lag issues, try and find similar apps on the Store that are doing similar drawing. If your performance does not equal that level, then your code can obviously be improved.
For instance today, I was coding a UITableView, but when I ran it - it was not fluid in scrolling. I just knew that something wasn't right as the hardware could obviously handle it; looking at scrolling performance in the Music app for instance. So I used the profiler tools and eventually tracked down my error.
Related
I’m a relatively new app developer working on a couple of individual projects. I’ve dumped at least one hundred hours into coding using Swift in Xcode, and, as embarrassing as it may be to admit, it seems I can’t fully grasp or find information pertaining to how popular apps such as Facebook, Instagram, YouTube, or Tinder implement non-linear view navigation via a menu bar at the bottom of the screen.
I’ve seen one particular app tutorial series that exemplifies how to go about making this menu bar style possible using a collection view of horizontally-placed views each equivalent to the size of the screen. I understand this gets rid of the issue of loading new views on top of existing old ones that sit in the background (my primary worry, outside of unnecessarily reloading information), but is this the typical method of implementing non-linear menu navigation in an app? I suppose a more pressing question at this point is “How can I go about making something like this using SwiftUI?”
If anyone can offer information, explanations, and/or sources, they would all be much appreciated. Thank you for your time!
So, upon receiving TylerTheCompiler’s comment on my post, I started researching the UITabView. It appears that this is used for creating exactly what I was trying to explain in the initial post. I subsequently searched for a way to implement this in SwiftUI and found the “tabbed view.” The tabbed view seems very easy to implement and is exactly what I’ve been looking for. I still wonder if popular applications have been utilizing the UITabBar rather than something else more practical that I am still unaware of. If you happen to know, please comment on this post — I would love to know, myself. As always, thank you for your time, everyone!
I am having a problem with iOS scrolling on an iPad. Every other platform tested works just fine. I love iOS, but hate it too. I was able to get the entire iframe contents scrolling within the parent, but there are two DIVs that are fixed that shouldn’t scroll within the iframe.
Before I spend a lot of time trying to work this out, I am just looking to leverage everyone’s experience for whether it, in fact, CAN be done. If it IS possible, then I will proceed to trying to work out a simple model and report it back for others. If experience shows that it can NOT be done, then you will all have saved me a lot of headache, not to mention time.
Here’s a drawing of what works on all other platforms but NOT iOS:
Simple question: Is it possible?
The simple answer is, in fact, YES.
I've been working on a small iPhone game using SpriteKit. Periodically the game will "hiccup" and freeze for a half a second before resuming (Activity monitor shows CPU usage drop to 0%). I don't really have a lead as to where things might be freezing up, and I'm unfamiliar with the tools xCode provides to solve these issues. I've experimented with setting up breakpoints and looking for where things freeze up, but I don't think it's the right way to solve the problem. What is the methodology for solving brief and seemingly random runtime issues that aren't easily reproduced?
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.
I want to display a number of book and magazine covers in my app (similar to the shelf view in iBooks). So far I have implemented my own UIScrollView which displays the covers just fine - unfortunately due to performance problems, I'm forced to rewrite the whole view; however I'm sure that someone else has solved this already and probably made it an open source project (possibly part of a bigger UI toolkit/library?).
Unfortunately I didn't get far by consulting Google, Google Code and github. There are a lot of projects, most of them are examples and tests or abadoned.
So basically I'm looking for a UIScrollView based class with the following features:
Possibility to define a cell size (of the thumbnail/cover)
Automatic layout depending on available space
Lazy loading (using a delegate which provides the cell contents)
Basically a UITableView, but for book shelfs.
Any pointers to existing projects or toolkits are highly appreciated!
Thanks!
Checkout AQGridView. In trying it out I was able to get a basic grid going pretty quickly, and there is support for bookshelves (as seen in Kobo for iPad), but I don't know how hard that would be.
Edit: I just noticed that it doesn't handle large quantities of items too well (after about 40 cells it started slowing down). After reading the 'Future Directions' part of the GitHub page it seems that he's going to something about it someday so it might be helpful to keep an eye on it.
Ended up writing a simple UIScrollView based class which loads contents as needed. It's not too complex to do, but I guess it would be nice if something like this was implemented in the core APIs of iOS.