新浪微博的布局

2021-09-08 14:30:01 字數 2756 閱讀 4134

#import "mjtabbaritem.h"

@implementation mjtabbaritem

- (id)initwithframe:(cgrect)frame itemdesc:(mjtabbaritemdesc *)desc

return self;

}#pragma mark - 覆蓋父類的2個方法

#pragma mark 設定按鈕標題的frame

- (cgrect)titlerectforcontentrect:(cgrect)contentrect

#pragma mark 設定按鈕的frame

- (cgrect)imagerectforcontentrect:(cgrect)contentrect

@end

@implementation mjtabbaritemdesc

+ (id)itemwithtitle:(nsstring *)title normal:(nsstring *)normal highlighted:(nsstring *)highlighted

- (void)dealloc

@end

*************************===

- (id)initwithdict:(nsdictionary *)dict

nsdictionary *retweeteddict = [dict objectforkey:@"retweeted_status"];

if (retweeteddict)

self.thumbnailpic = [dict objectforkey:@"thumbnail_pic"];

self.frame = [[[statusframe alloc] initwithstatus:self] autorelease];

}return self;

}- (void)dealloc

@end

#import

// 暱稱的字型大小

#define kscreennamesize 12

// 微博內容大小

#define kstatussize 15

@class status;

@inte***ce statusframe : nsobject

- (id)initwithstatus:(status *)statuscontent;

// cell的高度

@property (nonatomic, readonly) cgfloat cellheight;

// 使用者頭像

@property (nonatomic, readonly) cgrect icon;

// 使用者暱稱

@property (nonatomic, readonly) cgrect screenname;

// 微博內容

@property (nonatomic, readonly) cgrect status;

// 微博配圖

@property (nonatomic, readonly) cgrect image;

// **微博的整體布局

@property (nonatomic, readonly) cgrect retweet;

// **微博的暱稱

@property (nonatomic, readonly) cgrect retweetscreenname;

// **微博的內容

@property (nonatomic, readonly) cgrect retweetstatus;

// **微博的配圖

@property (nonatomic, readonly) cgrect retweetimage;

@end

#define kpadding 10

#define kiconwidth 40

#define kiconheight 40

#define kimagewidth 100

#define kimageheight 100

#import "statusframe.h"

#import "status.h"

#import "statuscell.h"

#import "status.h"

#import "user.h"

#import "statusframe.h"

// 暱稱的字型大小

#define kscreennamesize 12

// 微博內容大小

#define kstatussize 15

@inte***ce statuscell()

@end

@implementation statuscell

- (id)initwithstyle:(uitableviewcellstyle)style reuseidentifier:(nsstring *)reuseidentifier

return self;

}- (void)setstatuscontent:(status *)statuscontent else

status *retweet = statuscontent.retweetedstatus;

if (retweet) else

} else }}

#pragma mark 重新布局所有的子控制項

- (void)layoutsubviews

- (void)dealloc

@end

新浪微博授權

一.建立應用 2.進入我的應用 3.建立應用 二.oauth的授權流程 你所開發的應用需要的流程如下 2.得到request token後重定向使用者到服務商的授權頁面 3.如果使用者選擇授權你的應用,用request token向服務商請求換取access token 4.得到access tok...

模擬新浪微博隨便看看介面布局

布局 布局中標題欄的樣式是新建的乙個xml檔案 android layout width fill parent android layout height wrap content android orientation vertical android background d2691e 在主布...

實戰新浪微博 騰訊微博的分享功能

算上也是半年前做的,今天翻出來放出來,作為日誌記錄,也許能幫助一些人。我做的大概介面是如下圖。呵呵,上面這些都是些預備工作。下面正式開發。以上就是工程上設定。下面具體 以下處理sina的相關 以下是處理sina的授權驗證函式,qq的未寫。void removeauthdata bool islogg...