以下**純為個人娛樂編寫,若有錯誤之處還望大神指出,本人將更新完善
importuikit
public
enum zjhudmesalignment
class zjhud: nsobject
/** 新增提示語*/
class
func showmessage(_ mes:string)
/** 新增提示語*/
class
func showmessage(_ mes:string ,_ alignment:zjhudmesalignment) , completion: )}}
}}/** 隱藏hud*/
class
func hidden(_ time:timeinterval), completion: )}}
})}/** 延時執行*/
private
class
func afterexecutive(_ time: timeinterval, task: @escaping ()->())
var closure: (()->void)? = task
var result: task?
let delayedclosure: task =
}closure = nil
result = nil
}result = delayedclosure
dispatch_later
}//return result
}private
class
func hiddenfromsuperview()}}
}private
class zjhudview: uiview else
}/** 新增載入等待*/
private
func showloading(_ mes:string) else
}/** 新增提示語*/
private
func showmessage(_ mes:string ,_ alignment:zjhudmesalignment?) else
if alignment == zjhudmesalignment.top else
if alignment == zjhudmesalignment.botton
}/** 計算文字寬頻*/
private
func gettextwidth(textstr:string,font:uifont,height:cgfloat) -> cgfloat
required
init?(coder adecoder: nscoder)
}
SQLite的簡單封裝
studenttool.h sqlite的封裝 學生資料的crud import class student inte ce studenttool nsobject bool addstudent student student 獲得所有學生 return 陣列中裝著都說student模型 nsa...
MBProgressHUD的簡單封裝
下面是依據mbprogresshud分類提供的類方法 顯示一般資訊 void show nsstring text icon nsstring icon view uiview view 顯示有偏移量的資訊,yoffset,xoffset可以設定為0.f void showhint nsstring...
MBProgressHUD的簡單封裝
import import mbprogresshud.h inte ce mbhudhelper nsobject 顯示mbprogresshud指示器 api parameters 說明 atitle 標題 amsg 資訊 aimg 為nil時,只顯示標題 d 延時消失時間,為0時需要主動隱藏 ...