簡潔的ios小介面

2021-09-07 11:16:52 字數 1963 閱讀 5954

下午寫寫了個小東西小介面

有須要的能夠直接拿過來用 ,簡潔,挺好看,自我感覺;

寫介面事實上就是自上而下的在view加空間,注意一下位置即可了

- (id)initwithframe:(cgrect)frame

return self;

}

以上就是第乙個頁面的全部內容;

我們來看一下第二張圖吧

xib 中加入控制項實現這個效果三個都是label。設定一下字型什麼的即可 最後加乙個小 箭頭

注意在位址中我們用到了富文字label 將【預設】設定為紅色。看第二幅圖。

nsmutableattributedstring *str = [[nsmutableattributedstring alloc] initwithstring:@"using nsattributed string"];

[str addattribute:nsforegroundcolorattributename value:[uicolor bluecolor] range:nsmakerange(0,5)];

[str addattribute:nsforegroundcolorattributename value:[uicolor redcolor] range:nsmakerange(6,12)];

[str addattribute:nsforegroundcolorattributename value:[uicolor greencolor] range:nsmakerange(19,6)];

[str addattribute:nsfontattributename value:[uifont fontwithname:@"arial-bolditalicmt" size:30.0] range:nsmakerange(0, 5)];

[str addattribute:nsfontattributename value:[uifont fontwithname:@"helveticaneue-bold" size:30.0] range:nsmakerange(6, 12)];

[str addattribute:nsfontattributename value:[uifont fontwithname:@"courier-boldoblique" size:30.0] range:nsmakerange(19, 6)];

attrlabel.attributedtext = str;

本段**來自

以下是在設定tablecell的**。

-(uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath

cell = [cell setcelldictionary:dictionary];

return cell;

}

最後有乙個地方就是我們寫完tableview的時候是第三幅圖的樣子,後面沒有內容了可是還是有**線,那我們怎麼辦呢。

僅僅要加上一句話就夠了

self.tablefooterview = [[uiview alloc]init];
self 是tableview。

其它的就沒什麼了,主要是為了幫忙,寫了兩個介面。記錄一下不熟練的地方。

簡潔的ios小介面

下午寫寫了個小東西小介面 有需要的可以直接拿過來用 簡潔,挺好看,自我感覺 寫介面其實就是自上而下的在view加空間,注意一下位置就行了 id initwithframe cgrect frame return self 以上就是第乙個頁面的所有內容 我們來看一下第二張圖吧 xib 中新增控制項實現...

IOS 日期的簡潔格式展示

首先我要解釋一下標題的意義,日期的簡潔格式展示,之所以簡介,是因為讓人一目了然,不需要思考是什麼時候。例如 剛剛 幾分鐘前 幾小時前等等。今天這裡帶來的是乙個簡單的類別。方便實用。以及簡單的實際應用。先看看一看類別是什麼樣子的 h import inte ce nsdate cxextension ...

IOS 簡潔輸入框的實現

我也試著自己寫了乙個小小對話方塊,先看一下樣式 主要的功能有 通過功能區分我們可以大致將該檢視分成三個部分,第乙個是分割線,寬度為1的uiview,第二個是類似html中的具有placeholder功能的輸入框,最後是按鈕button。輸入框是由uilabel uitextview uiimagev...