ios 新浪微博開發 14(新特性2)

2021-07-05 09:31:29 字數 1868 閱讀 7378

在上次的基礎上進行**的修改

#import "qhnewfeatureviewcontroller.h"

#define qhnewfeaturecount 4

@inte***ce qhnewfeatureviewcontroller ()@property(nonatomic,weak)uipagecontrol *pagecontrol;

@end

@implementation qhnewfeatureviewcontroller

- (void)viewdidload

}#warning 預設情況下 scrollview 一建立出來 它裡面就可能存在一些控制項了

#warning 就算不主動新增一些控制項到scrollview中 內部還還是可能會有一些控制項

//3.設定scrollview的其他屬性

//如果想要某個方向不能滾動 那麼那個方向對應的儲存數值傳0

scrollview.contentsize = cgsizemake(qhnewfeaturecount *scrollview.width, 0);

//取出彈簧效果

scrollview.bounces = no;

scrollview.pagingenabled = yes;

scrollview.showshorizontalscrollindicator = no;

//4.設定pagecontroll

uipagecontrol *pagecontrol = [[uipagecontrol alloc]init];

pagecontrol.numberofpages = qhnewfeaturecount;

//@property(nonatomic,retain) uicolor *currentpageindicatortintcolor

pagecontrol.currentpageindicatortintcolor =[uicolor colorwithred:0.98f green:0.38f blue:0.11f alpha:1.00f];

pagecontrol.pageindicatortintcolor =[uicolor colorwithred:0.74f green:0.74f blue:0.74f alpha:1.00f];

pagecontrol.centerx = scrollview.width *0.5;

pagecontrol.centery = scrollview.height - 50;

[self.view addsubview:pagecontrol];

self.pagecontrol = pagecontrol;

// 不用設定尺寸也可以顯示

// pagecontrol.width = 100;

// pagecontrol.height = 50;

// pagecontrol.userinteractionenabled = no;

/***[uicolor colorwithred:0.98f green:0.38f blue:0.11f alpha:1.00f];橙色

*[uicolor colorwithred:0.74f green:0.74f blue:0.74f alpha:1.00f];灰色

*/}- (void)scrollviewdidscroll:(uiscrollview *)scrollview

- (void)setuplastimageview:(uiimageview *)imageview

- (void)shareclick:(uibutton *)sharebtn

- (void)didreceivememorywarning

ios 新浪微博開發 15(新特性3)

注釋寫的很詳細 import qhnewfeatureviewcontroller.h import qhtabbarviewcontroller.h define qhnewfeaturecount 4 inte ce qhnewfeatureviewcontroller property non...

新浪微博專案之新特性介面

define ggnewfeaturecount 4 void viewdidload warning 預設情況下,scrollview一建立出來,它裡面可能就存在一些子控制項了 warning 就算不主動新增子控制項到scrollview中,scrollview內部還是可能會有一些子控制項 3.設...

IOS新浪微博分享鏈結

所以,筆者這裡把分享的文字和url拼在一起,結果就可以分享帶鏈結的內容了。把分享內容和ulr拼接在一起 nsstring sinacontent nsstring stringwithformat content,url sharedcontent sharesdk content sinacont...