collectionview

2 different cell sizes in UICollectionView Objective C

蓝咒 提交于 2019-12-03 13:19:58
I would like to use UICollectionView, it is possible to create the following layout: As you can see, there are two different sizes of the cell. One is 1/4 of the row, the other is 3/4. Is it possible to create this kind of layout with a UICollectionView? Would anyone can teach me how to do it??? Or is there any samples??? I have already study many tutorials and reference. But still dont know how to do it.. Thanks! nithinbhaktha Well I have hardcoded the item width for the time being (72.0 and 23.0). The rest of 5.0 will be used in interim spacing and edgeInsets. This code will give you exactly

Stuck understanding how to create a table with multiple columns in iOS Swift

自闭症网瘾萝莉.ら 提交于 2019-12-03 07:30:33
问题 I've spent the better half of the day so far researching and trying to understand how to make a table with multiple columns. Embarrassingly, I am still quite new to Swift and programming in general so a lot of the stuff I've read and found aren't helping me too much. I have basically found exactly what I want to create with this gentleman's blo: http://www.brightec.co.uk/blog/uicollectionview-using-horizontal-and-vertical-scrolling-sticky-rows-and-columns However, even with his Github I'm

Remove space between sections in collectionview

喜你入骨 提交于 2019-12-03 07:10:18
问题 How to adjust the spacing between sections of collection view. 回答1: Header height can be adjusted by adjusting the params of the collection view layout. Following is the code which works perfectly fine. - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { if ([[sectionHeaderArray objectAtIndex:section] boolValue]) { return UIEdgeInsetsMake(10, 10, 10, 10); } return UIEdgeInsetsZero; }

iOS UICollectionView prototype cell size property ignored

浪子不回头ぞ 提交于 2019-12-03 03:52:35
问题 I'm using a UICollectionView with two prototype cells. The prototype cells have different widths and contain different controls (image view and web view). I'm definitely returning the correct prototype cell for a given index (all the cells display the correct content), but the prototype cell size is ignored and the collection view's item size is used instead. It's not like I'm manually setting the size. What's the point of allowing the prototype cell to be sized in storyboard if the property

Remove space between sections in collectionview

只愿长相守 提交于 2019-12-02 20:45:52
How to adjust the spacing between sections of collection view. Header height can be adjusted by adjusting the params of the collection view layout. Following is the code which works perfectly fine. - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { if ([[sectionHeaderArray objectAtIndex:section] boolValue]) { return UIEdgeInsetsMake(10, 10, 10, 10); } return UIEdgeInsetsZero; } Mayank Birani You can use the method to implement this: - (UIEdgeInsets)collectionView:(UICollectionView *

iOS UICollectionView prototype cell size property ignored

僤鯓⒐⒋嵵緔 提交于 2019-12-02 16:28:57
I'm using a UICollectionView with two prototype cells. The prototype cells have different widths and contain different controls (image view and web view). I'm definitely returning the correct prototype cell for a given index (all the cells display the correct content), but the prototype cell size is ignored and the collection view's item size is used instead. It's not like I'm manually setting the size. What's the point of allowing the prototype cell to be sized in storyboard if the property is just ignored when it's actually displayed? Alex the Ukrainian The size of the cell in the storyboard

Own CollectionView for paging, sorting and filtering

故事扮演 提交于 2019-12-01 11:30:18
I've implemented my own CollectionView to bind a collection of data to a DataGrid in WPF. The main goal was the pagination, which is working quite well. I've written the following C# code: public class SchemesCollectionView : CollectionView { private readonly IList<Scheme> innerList; private readonly int itemsPerPage; private int currentPage = 1; public SchemesCollectionView(IList<Scheme> source, int itemsPerPage) : base(source) { innerList = source; this.itemsPerPage = itemsPerPage; } public override int Count { get { return itemsPerPage; } } public int CurrentPage { get { return currentPage;

Paged Collection View in WPF

大兔子大兔子 提交于 2019-12-01 04:47:59
Is there an implementation of PagedCollectionView in WPF around? It exists in Silverlight but isn't in WPF. If there isn't, what would be the simplest way to implement this? You can simply take the code from the Silverlight one and use that in your WPF project. Sam L. Or use only the CollectionView class and "double filter" your collection solution found here: Own CollectionView for paging, sorting and filtering I've pasted the code snipet here for your convinience: // obtenir la CollectionView ICollectionView cvCollectionView = CollectionViewSource.GetDefaultView(this.Suivis); if

Paged Collection View in WPF

时光总嘲笑我的痴心妄想 提交于 2019-12-01 02:24:15
问题 Is there an implementation of PagedCollectionView in WPF around? It exists in Silverlight but isn't in WPF. If there isn't, what would be the simplest way to implement this? 回答1: You can simply take the code from the Silverlight one and use that in your WPF project. 回答2: Or use only the CollectionView class and "double filter" your collection solution found here: Own CollectionView for paging, sorting and filtering I've pasted the code snipet here for your convinience: // obtenir la

Swipe to delete on CollectionView

↘锁芯ラ 提交于 2019-12-01 02:11:37
I'm trying to replicate the swipe to delete function like in the mail tableview. Only this time I need to build it on a collectionview but I'm having a bit of a hard time. It's a horizontal scrolling list with a swipe up to delete. I already got the swipe up working but having a hard time figuring out how I need to setup the swipe to delete / tap to delete or ignore functionality. It looks like the following: So I'm using the following collectionview: func buildCollectionView() { let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() layout.scrollDirection = .horizontal layout