开发者

Weird animations when navigating through views or reloading table view contents

I'm currently working on a MonoTouch application with a NavigationController, a root view with some ImageViews in it and some standard and customized/subclassed TableViews and TableViewCells. Some elements are located in xib files, others are code only.

Navigation and table contents itself work fine. However, I suffer some weird "animation" effects... I'm trying my best to describe them as good as possible.

1) When navigating back and forth on the navigation stack, each time a view appears, it looks like the items of that view are re-layouted. When navigating from a subview back to the root view, it's ImageViews start off at some location where they shouldn't be and slide to the right location.

2) TableViewCells "unfold/reveal" their content from top to bottom when appearing in the visible area, even when reloading without animation:

TableView.ReloadSections(new NSIndexSet(1), UITableViewRowAnimation.None);

Scrolling down the table, each cell seems to trigger it's own "unfolding" animation separately as soon as it becomes visible.

3) Scroll bars of TableViews slide from view to view.

For example, when tapping a cell that pushes another TableView on the stack:

- Parent table slides out to the left / sub-table slides in from the right (as it should)

- When sub-table has fully appeared, it's visible cells "unfold" from top (of the table) to bottom

- Finally, when this weird cell unfolding has finished, the scroll bar slides in from the left (where the parent table "is") to it's correct location on the right side. So it looks like it is reusing the scroll bar of the parent table.

4) When displaying the network activity indicator...

UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true;

... it appears where the network carrier name is (left-most on the status bar) and slides to it's intended location (next to signal strength indicator). The same happens to the "You are being located" arrow. When starting a LocationManager, t开发者_开发百科he arrow appears on the carrier name and slides to the right.

All this animation and slide action is really irritating and distracting. I checked on some other MonoTouch apps on the AppStore, none are suffering from this.

What have I done wrong with my application? I'm really grateful for hints on what might cause this weird behavior and how to disable it.


I had this just today - I'd performed some animations in my app using

UIView.BeginAnimations("AnimationName");
UIView.SetAnimationDuration(0.5f);
// and so on...

and it turns out I hadn't actually committed my animations (using:

UIView.CommitAnimations();

ensuring I had called CommitAnimations() got rid of this behaviour!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜