NSString *s =@"1445416710";
NSDate *d = [NSDate dateWithTimeIntervalSince1970:[s floatValue]];
NSDateFormatter *dateformatter=[[NSDateFormatter alloc] init];
[dateformatter setDateFormat:@"yyyy年MM月dd日 HH:mm:ss"];
NSString * dateStr=[dateformatter stringFromDate:d];
NSLog(@"%@",dateStr);
//將父視圖上的所有元素加到一個(gè)數(shù)組里面進(jìn)行遍歷
for (UIView *view in self.view.subviews) {
//從父視圖上,判斷是不是這個(gè)類型的元素
if ([view isKindOfClass:[UICollectionViewCell class]]) {
//如果是則從父視圖上刪除
[view removeFromSuperview];
}
}
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者