}else if([[typeArr objectAtIndex:i]isEqualToString:@"chat"]){ //chat UIView *chatBase=[[UIView alloc]init]; CGFloat npy=0;int j=1; for(id dialogue in [contArr objectAtIndex:i]){ UILabel *np=[[UILabel alloc]init];np.numberOfLines=0; np.text=[NSString stringWithFormat:@"%@%@",[dialogue objectForKey:@"label"],[dialogue objectForKey:@"phrase"]];np.font=sf(15); CGSize npsize=[np.text sizeWithFont:np.font constrainedToSize:CGSizeMake(sw-40,sh-50) lineBreakMode:UILineBreakModeTailTruncation]; np.textColor=[UIColor blackColor];np.backgroundColor=[UIColor whiteColor];np.frame=CGRectMake(20,npy,npsize.width,npsize.height); [chatBase addSubview:np]; npy+=npsize.height+20;j++; if(j>[[contArr objectAtIndex:i]count]) break; UIImage *line=[UIImage imageNamed:@"gray"]; UIImageView *linev=[[UIImageView alloc]initWithImage:line];linev.alpha=0.7;[linev setFrame:CGRectMake(20,npy-12,sw-40,5)]; [chatBase addSubview:linev]; } UIScrollView *chatScr=[[UIScrollView alloc]initWithFrame:CGRectMake(0,30,sw,sh-50)];[postv addSubview:chatScr]; [chatScr addSubview:chatBase]; [chatScr setContentSize:CGSizeMake(sw-40, npy)]; }できた。あとはaudio,videoか。これができればあとはtimelinestyleも作るか。楽しみは尽きない。gearも復活したことやし、のんびりやろう。
夜は中華そば無限@海老江で塩そばとごはん。これは美味い。閉まるの早いからなかなか来れんけど、今月限定の無限流高井田系食べてみたい。
0 件のコメント:
コメントを投稿