Skip to content

Commit

Permalink
TLKit升级
Browse files Browse the repository at this point in the history
  • Loading branch information
tbl00c committed Jan 28, 2020
1 parent bf64bc0 commit dbbc9ea
Show file tree
Hide file tree
Showing 24 changed files with 75 additions and 81 deletions.
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ CHECKOUT OPTIONS:
:git: https://github.com/tbl00c/JZNavigationExtension.git
:tag: '4.0'
TLKit:
:commit: a998f76b1630cbceccad264869f2bff1e94523f5
:commit: 9ce656fa5eb43336043fafde983c56c4f8ef632d
:git: https://github.com/tbl00c/TLKit.git
TLTabBarController:
:git: https://github.com/tbl00c/TLTabBarController.git
Expand Down
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Pods/TLKit/TLKit/TLFunctional/TLActionSheet/TLActionSheet.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Pods/TLKit/TLKit/TLFunctional/TLAlertView/TLAlertView.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions Pods/TLKit/TLKit/TLFunctional/TLAlertView/TLAlertView.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions Pods/TLKit/TLKit/TLFunctional/TLUIUtility/TLUIUtility.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 0 additions & 45 deletions Pods/TLKit/TLKit/TLFunctional/TLUIUtility/TLUIUtility.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ - (void)p_deleteMessage:(TLMessage *)message
[MobClick event:EVENT_DELETE_MESSAGE];
}
else {
[TLUIUtility showAlertWithTitle:@"错误" message:@"从数据库中删除消息失败。"];
[TLAlertView showAlertWithTitle:@"错误" message:@"从数据库中删除消息失败。"];
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ - (void)deleteMessage:(TLMessage *)message withAnimation:(BOOL)animation
[MobClick event:EVENT_DELETE_MESSAGE];
}
else {
[TLUIUtility showAlertWithTitle:@"错误" message:@"从数据库中删除消息失败。"];
[TLAlertView showAlertWithTitle:@"错误" message:@"从数据库中删除消息失败。"];
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ - (void)moreKeyboard:(id)keyboard didSelectedFunctionItem:(TLMoreKeyboardItem *)
[imagePickerController setSourceType:UIImagePickerControllerSourceTypeCamera];
}
else {
[TLUIUtility showAlertWithTitle:@"错误" message:@"相机初始化失败"];
[TLAlertView showAlertWithTitle:@"错误" message:@"相机初始化失败"];
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ - (void)loadChatDetailUI
PushVC(userDetailVC);
}
else if (eventType == TLUserGroupCellEventTypeAdd) {
[TLUIUtility showAlertWithTitle:@"提示" message:@"添加讨论组成员"];
[TLAlertView showAlertWithTitle:@"提示" message:@"添加讨论组成员"];
}
return nil;
});;
Expand Down Expand Up @@ -137,7 +137,7 @@ - (void)loadChatDetailUI
if (buttonIndex == 0) {
BOOL ok = [[TLMessageManager sharedInstance] deleteMessagesByPartnerID:self.user.userID];
if (!ok) {
[TLUIUtility showAlertWithTitle:@"错误" message:@"清空聊天记录失败"];
[TLAlertView showAlertWithTitle:@"错误" message:@"清空聊天记录失败"];
}
else {
[[NSNotificationCenter defaultCenter] postNotificationName:NOTI_CHAT_VIEW_RESET object:nil];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ - (void)loadChatGroupDetailUI:(TLGroup *)group
PushVC(userDetailVC);
}
else if (eventType == TLUserGroupCellEventTypeAdd) {
[TLUIUtility showAlertWithTitle:@"提示" message:@"添加讨论组成员"];
[TLAlertView showAlertWithTitle:@"提示" message:@"添加讨论组成员"];
}
return nil;
});;
Expand Down Expand Up @@ -203,7 +203,7 @@ - (void)loadChatGroupDetailUI:(TLGroup *)group
if (buttonIndex == 0) {
BOOL ok = [[TLMessageManager sharedInstance] deleteMessagesByPartnerID:self.group.groupID];
if (!ok) {
[TLUIUtility showAlertWithTitle:@"错误" message:@"清空聊天记录失败"];
[TLAlertView showAlertWithTitle:@"错误" message:@"清空聊天记录失败"];
}
else {
[[NSNotificationCenter defaultCenter] postNotificationName:NOTI_CHAT_VIEW_RESET object:nil];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ - (void)updateSearchResultsForSearchController:(UISearchController *)searchContr
//MARK: UISearchBarDelegate
- (void)searchBarBookmarkButtonClicked:(UISearchBar *)searchBar
{
[TLUIUtility showAlertWithTitle:@"语音搜索按钮"];
[TLAlertView showAlertWithTitle:@"语音搜索按钮" message:nil];
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ - (void)p_tableView:(UITableView *)tableView deleteItemAtIndexPath:(NSIndexPath
// 从数据库中删除
BOOL ok = [[TLMessageManager sharedInstance] deleteConversationByPartnerID:conversation.partnerID];
if (!ok) {
[TLUIUtility showAlertWithTitle:@"错误" message:@"从数据库中删除会话信息失败"];
[TLAlertView showAlertWithTitle:@"错误" message:@"从数据库中删除会话信息失败"];
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ - (TLAddMenuView *)addMenuView
PushVC(vc);
}
else {
[TLUIUtility showAlertWithTitle:item.title message:@"功能暂未实现"];
[TLAlertView showAlertWithTitle:item.title message:@"功能暂未实现"];
}
}];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ - (void)didTap5TimesScreen:(UITapGestureRecognizer *)sender
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
if (error) {
[TLUIUtility showAlertWithTitle:@"错误" message:[NSString stringWithFormat:@"保存图片到系统相册失败\n%@", [error description]]];
[TLAlertView showAlertWithTitle:@"错误" message:[NSString stringWithFormat:@"保存图片到系统相册失败\n%@", [error description]]];
}
else {
[TLUIUtility showSuccessHint:@"已保存到系统相册"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ - (void)initUserData
NSNumber *lastRunDate = [[NSUserDefaults standardUserDefaults] objectForKey:@"lastRunDate"];

if (lastRunDate == nil) {
[TLUIUtility showAlertWithTitle:@"提示" message:@"首次启动App,是否随机下载两组个性表情包,稍候也可在“我的”-“表情”中选择下载。" cancelButtonTitle:@"取消" otherButtonTitles:@[@"确定"] actionHandler:^(NSInteger buttonIndex) {
[TLAlertView showAlertWithTitle:@"提示" message:@"首次启动App,是否随机下载两组个性表情包,稍候也可在“我的”-“表情”中选择下载。" cancelButtonTitle:@"取消" otherButtonTitles:@[@"确定"] actionHandler:^(NSInteger buttonIndex) {
if (buttonIndex == 1) {
[self downloadDefaultExpression];
}
Expand All @@ -30,7 +30,7 @@ - (void)initUserData
NSLog(@"今天第%ld次进入", (long)sponsorStatus.integerValue);
if ([date isSameDay:[NSDate date]]) {
if (sponsorStatus.integerValue == 3) {
[TLUIUtility showAlertWithTitle:nil message:@"如果此份源码对您有足够大帮助,您可以小额赞助我,以激励我继续维护,做得更好。" cancelButtonTitle:@"不了" otherButtonTitles:@[@"小额赞助"] actionHandler:^(NSInteger buttonIndex) {
[TLAlertView showAlertWithTitle:nil message:@"如果此份源码对您有足够大帮助,您可以小额赞助我,以激励我继续维护,做得更好。" cancelButtonTitle:@"不了" otherButtonTitles:@[@"小额赞助"] actionHandler:^(NSInteger buttonIndex) {
if (buttonIndex == 1) {
TLWalletViewController *walletVC = [[TLWalletViewController alloc] init];
[walletVC setHidesBottomBarWhenPushed:YES];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ - (void)saveQRCodeToSystemAlbum
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
if (error) {
[TLUIUtility showAlertWithTitle:@"错误" message:[NSString stringWithFormat:@"保存图片到系统相册失败\n%@", [error description]]];
[TLAlertView showAlertWithTitle:@"错误" message:[NSString stringWithFormat:@"保存图片到系统相册失败\n%@", [error description]]];
}
else {
[TLUIUtility showSuccessHint:@"已保存到系统相册"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ - (void)viewDidLoad
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
if (error) {
[TLUIUtility showAlertWithTitle:@"保存失败" message:[NSString stringWithFormat:@"%@", [error description]]];
[TLAlertView showAlertWithTitle:@"保存失败" message:[NSString stringWithFormat:@"%@", [error description]]];
}
else {
[TLUIUtility showAlertWithTitle:@"保存成功" message:@"谢谢" cancelButtonTitle:@"确定" otherButtonTitles:nil actionHandler:^(NSInteger buttonIndex) {
[TLAlertView showAlertWithTitle:@"保存成功" message:@"谢谢" cancelButtonTitle:@"确定" otherButtonTitles:nil actionHandler:^(NSInteger buttonIndex) {
[MobClick event:EVENT_WALLET_QR_SAVE];
}];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ - (void)p_loadData
[MobClick event:EVENT_GET_CONTACTS];
} failed:^{
[TLUIUtility hiddenLoading];
[TLUIUtility showAlertWithTitle:@"错误" message:@"未成功获取到通讯录信息"];
[TLAlertView showAlertWithTitle:@"错误" message:@"未成功获取到通讯录信息"];
}];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ - (void)scannerViewControllerInitSuccess:(TLScannerViewController *)scannerVC

- (void)scannerViewController:(TLScannerViewController *)scannerVC initFailed:(NSString *)errorString
{
[TLUIUtility showAlertWithTitle:@"错误" message:errorString cancelButtonTitle:@"确定" otherButtonTitles:nil actionHandler:^(NSInteger buttonIndex) {
[TLAlertView showAlertWithTitle:@"错误" message:errorString cancelButtonTitle:@"确定" otherButtonTitles:nil actionHandler:^(NSInteger buttonIndex) {
[self.navigationController popViewControllerAnimated:YES];
}];
}
Expand All @@ -81,7 +81,7 @@ - (void)imagePickerController:(UIImagePickerController *)picker didFinishPicking
[TLScannerViewController scannerQRCodeFromImage:image ans:^(NSString *ansStr) {
[TLUIUtility hiddenLoading];
if (ansStr == nil) {
[TLUIUtility showAlertWithTitle:@"扫描失败" message:@"请换张图片,或换个设备重试~" cancelButtonTitle:@"确定" otherButtonTitles:nil actionHandler:^(NSInteger buttonIndex) {
[TLAlertView showAlertWithTitle:@"扫描失败" message:@"请换张图片,或换个设备重试~" cancelButtonTitle:@"确定" otherButtonTitles:nil actionHandler:^(NSInteger buttonIndex) {
[self.scanVC startCodeReading];
}];
}
Expand Down Expand Up @@ -158,7 +158,7 @@ - (void)p_analysisQRAnswer:(NSString *)ansStr
});
}
else {
[TLUIUtility showAlertWithTitle:@"扫描结果" message:ansStr cancelButtonTitle:@"确定" otherButtonTitles:nil actionHandler:^(NSInteger buttonIndex) {
[TLAlertView showAlertWithTitle:@"扫描结果" message:ansStr cancelButtonTitle:@"确定" otherButtonTitles:nil actionHandler:^(NSInteger buttonIndex) {
[self.scanVC startCodeReading];
}];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (void)p_takePhoto
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
[imagePickerController setDelegate:self];
if(![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
[TLUIUtility showAlertWithTitle:@"错误" message:@"相机初始化失败"];
[TLAlertView showAlertWithTitle:@"错误" message:@"相机初始化失败"];
}
else {
[imagePickerController setSourceType:UIImagePickerControllerSourceTypeCamera];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ - (void)loadShakeSettingUI
// 默认背景图
self.addCell(CELL_ST_ITEM_NORMAL).toSection(sectionTag).withDataModel(TLCreateSettingItem(@"使用默认背景图片")).selectedAction(^ (id data) {
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"Shake_Image_Path"];
[TLUIUtility showAlertWithTitle:@"已恢复默认背景图"];
[TLAlertView showAlertWithTitle:@"已恢复默认背景图" message:nil];
});

// 换张背景图
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigat
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error
{
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
[TLUIUtility showAlertWithTitle:nil message:[error description]];
[TLAlertView showAlertWithTitle:nil message:[error description]];
}

// 页面跳转处理
Expand Down

0 comments on commit dbbc9ea

Please sign in to comment.