微信運動步數(作者:johntai)
healthkit使用步驟,以增加微信運動步數為例。

tableviewcell自適應cell高度(作者:劉小椿)
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.arr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
cell.textLabel.numberOfLines = 100;
cell.textLabel.font = [UIFont systemFontOfSize:15];
cell.textLabel.text = self.arr[indexPath.row];
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString* text = self.arr[indexPath.row];
CGSize constraint = CGSizeMake(375-40, 100);
NSAttributedString* attributedText = [[NSAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]}];
CGRect rect = [attributedText boundingRectWithSize:constraint options:NSStringDrawingUsesLineFragmentOrigin context:nil];
CGSize size = rect.size;
CGFloat height = MAX(size.height, 20);
NSLog(@"%f",height);
return height+10;
}
無限圖片輪播Banner(作者:iOS_Lover)
// 網絡加載圖片的輪播器(只需一步設置即可使用) cycleScrollView.imageURLStringsGroup = imagesURLStrings;
現已支持cocoapods導入:pod 'SDCycleScrollView','~> 1.3'
如需更詳細的設置,參考如下:
cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentRight; // 設置pageControl居右,默認居中 cycleScrollView.titlesGroup = 標題數組(數組元素個數必須和圖片數組元素個數保持一致); // 如果設置title數組,則會在圖片下面添加標題 cycleScrollView.delegate = ; // 如需監聽圖片點擊,請設置代理,實現代理方法 cycleScrollView.autoScrollTimeInterval = ;// 自定義輪播時間間隔

仿QQ 微信群詳細信息頁面UI(作者:hackxhj)
仿QQ 微信群詳細信息頁面UI

手勢解鎖demo(作者:凱哥來了)
這是我自己寫的一個手勢解鎖demo ,希望方便大家的使用。前面沒有上傳完全,這才是終極版
