在 Xamarin ios 中以不同样式(列表、网格、块)显示项目? [英] Display items in different styles(List, Grid, Blocks) in Xamarin ios?

查看:36
本文介绍了在 Xamarin ios 中以不同样式(列表、网格、块)显示项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 xamarin ios 的新手.我想在视图控制器中实现不同样式(列表、网格、块)的显示项.我尝试使用表格视图单元格,但我无法使其正确.请找到以下图片.当我们点击图标(列表图标、网格图标、块图标)时,我们需要在同一个视图控制器中显示不同样式的视图.请建议我如何使其成为可能.

i am new to xamarin ios. i want to implement display items in different styles (List,Grid,Blocks) in view controller. I tried with table view cell, But i am unable to make it proper. Please find the below images. When ever we click on icons (List icon, grid icon, Block icon) we need to display the different styles view in same view controller. Please suggest me how to make it possible.

提前致谢.

推荐答案

当您在谈论视图控制器和表视图单元格时,我假设您没有使用 Xamarin Forms.这意味着您正在创建本机 iOS 用户界面,并且您可以使用 UICollectionView 完成您要完成的任务.特别是您想使用 performBatchUpdates:completion: 方法,该方法允许您为重新加载和移动操作设置动画.

As you are talking about view controllers and table view cells I assume you are not working with Xamarin Forms. This means you are creating a native iOS user interface and what you are trying to accomplish can be done with a UICollectionView. In particular you want to use the performBatchUpdates:completion: method, which allows you to animate reload and move operations.

这篇关于在 Xamarin ios 中以不同样式(列表、网格、块)显示项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆