Skip to content
프로젝트

awdigital/AWCollectionViewDialLayout

GitHub에서 보기

소개

셀을 반원형으로 배치하고 보기 좋은 어안 효과를 적용하는 UICollectionViewLayout입니다.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

AWCollectionViewDialLayout

UICollectionViewLayout for displaying cells in a semi-circle with a nice fish eye effect.

Very handy for quickly browsing items with your left thumb without having some of the content hidden behind your finger while you scroll.

Demo Gif


####Initialize Layout

// Radius : The radius of your circle
// Angular spacing: Angle between items (deg)
// Cell Size: Size of your cell
// Alignment: Supports 2 Types: WHEELALIGNMENTLEFT and WHEELALIGNMENTCENTER
// X-Offset: To translate the circle along the x-axis

AWCollectionViewDialLayout *dialLayout = [[AWCollectionViewDialLayout alloc] initWithRadius:300.0  andAngularSpacing:18.0 andCellSize:CGSizeMake(240, 100) andAlignment:WHEELALIGNMENTCENTER andItemHeight:100  andXOffset:70];

####Enable Snap Mode

[dialLayout setShouldSnap:YES];

####Programmatically scroll to item at index

Use the cell_height variable you used to initialize the CollectionViewLayout and multiply it by the IndexPath.item

// Scroll to item at indexPath (0,2)
 [self.collectionView setContentOffset:CGPointMake(0, cell_height * 2) animated:YES];

Flip Horizontally

You can set the flip option to YES if you want to display your items on the right side of the CollectionView.

[dialLayout setShouldFlip:YES];

관련 프로젝트 살펴보기

불러오는 중…