Skip to content

Commit

Permalink
1.3.*
Browse files Browse the repository at this point in the history
版本更新,修复一些警告显示
  • Loading branch information
midoks committed Dec 16, 2015
1 parent 06ba916 commit 53ad164
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 102 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,6 @@
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "dnspod/UIDnsPod/MUser/MUserListViewController.m"
timestampString = "469517339.055859"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "194"
endingLineNumber = "194"
landmarkName = "-addUserDataChecked"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "dnspod/UIDnsPod/MUser/MUserListViewController.m"
timestampString = "469517339.055859"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "199"
endingLineNumber = "199"
landmarkName = "-addUserDataChecked"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
Expand Down
2 changes: 1 addition & 1 deletion dnspod/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.2</string>
<string>1.3.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
89 changes: 44 additions & 45 deletions dnspod/UIDnsPod/MDnsPodRecordAddViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NS
#pragma mark 点击操作
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
switch (indexPath.row) {
case 0:[self ModRecord];break;
case 1:[self ModRecordValue];break;
Expand All @@ -147,47 +148,47 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *
}
}

#pragma mark - UIAlertViewDelegate Methods -
#pragma mark 执行操作
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
NSString *value;
//主机记录
if([alertView.title isEqualToString:MDRECORDNAME] && (buttonIndex == 1)){
value = [[alertView textFieldAtIndex:0] text];
[_data setObject:value forKey:MDRECORDNAME];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
NSArray *path = @[indexPath];
[_table reloadRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationLeft];
}

//记录值
if([alertView.title isEqualToString:MDRECORDVALUE] && (buttonIndex == 1)){
value = [[alertView textFieldAtIndex:0] text];
[_data setObject:value forKey:MDRECORDVALUE];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
NSArray *path = @[indexPath];
[_table reloadRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationLeft];
}

//MX优先级
if([alertView.title isEqualToString:MDRECORDMX] && (buttonIndex == 1)){
value = [[alertView textFieldAtIndex:0] text];
[_data setObject:value forKey:MDRECORDMX];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
NSArray *path = @[indexPath];
[_table reloadRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationMiddle];
}

//TLL
if([alertView.title isEqualToString:MDRECORDTLL] && (buttonIndex == 1)){
value = [[alertView textFieldAtIndex:0] text];
[_data setObject:value forKey:MDRECORDTLL];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
NSArray *path = @[indexPath];
[_table reloadRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationMiddle];
}
}
//#pragma mark - UIAlertViewDelegate Methods -
//#pragma mark 执行操作
//-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
//{
// NSString *value;
// //主机记录
// if([alertView.title isEqualToString:MDRECORDNAME] && (buttonIndex == 1)){
// value = [[alertView textFieldAtIndex:0] text];
// [_data setObject:value forKey:MDRECORDNAME];
// NSIndexPath *indexPath = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
// NSArray *path = @[indexPath];
// [_table reloadRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationLeft];
// }
//
// //记录值
// if([alertView.title isEqualToString:MDRECORDVALUE] && (buttonIndex == 1)){
// value = [[alertView textFieldAtIndex:0] text];
// [_data setObject:value forKey:MDRECORDVALUE];
// NSIndexPath *indexPath = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
// NSArray *path = @[indexPath];
// [_table reloadRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationLeft];
// }
//
// //MX优先级
// if([alertView.title isEqualToString:MDRECORDMX] && (buttonIndex == 1)){
// value = [[alertView textFieldAtIndex:0] text];
// [_data setObject:value forKey:MDRECORDMX];
// NSIndexPath *indexPath = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
// NSArray *path = @[indexPath];
// [_table reloadRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationMiddle];
// }
//
// //TLL
// if([alertView.title isEqualToString:MDRECORDTLL] && (buttonIndex == 1)){
// value = [[alertView textFieldAtIndex:0] text];
// [_data setObject:value forKey:MDRECORDTLL];
// NSIndexPath *indexPath = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
// NSArray *path = @[indexPath];
// [_table reloadRowsAtIndexPaths:path withRowAnimation:UITableViewRowAnimationMiddle];
// }
//}

#pragma mark 修改主机记录
-(void)ModRecord
Expand Down Expand Up @@ -228,17 +229,15 @@ -(void)ModRecordCommonValue:(NSString *)name value:(NSString *)value
notice:(NSString *)notice tag:(NSInteger)tag key:(NSString *)key;
{

UIAlertController *alertRecord = [UIAlertController alertControllerWithTitle:@"修改记录值"
message:@"请输入或修改记录值"
UIAlertController *alertRecord = [UIAlertController alertControllerWithTitle:name
message:notice
preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction *cancal = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
}];

UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {



NSString *value = alertRecord.textFields.firstObject.text;

//NSLog(@"v:%@",value);
Expand Down
9 changes: 7 additions & 2 deletions dnspod/UIDnsPod/MSetting/MSettingViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
if (section == 0) {
return 1;
}else if(section == 1){
return 2;
return 3;
} else if (section == 2) {
return 1;
}
Expand Down Expand Up @@ -94,8 +94,13 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NS
}else if(indexPath.section == 1){
if (indexPath.row == 0) {
cell.textLabel.text = @"关于我们";
}else if(indexPath.row){
}else if(indexPath.row == 1){
cell.textLabel.text = @"反馈或建议";
}else if (indexPath.row == 2){
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
cell.textLabel.text = @"版本";
cell.detailTextLabel.text = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
//cell.textLabel.text = ;
}
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
} else if (indexPath.section == 2) {
Expand Down
22 changes: 0 additions & 22 deletions dnspod/UIDnsPod/MUser/MUserListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,28 +138,6 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *
[self presentViewController:alertController animated:YES completion:nil];
}

#pragma mark - AlertViewDelegate -
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if([alertView.title isEqual:@"添加用户"] && (buttonIndex == 1))
{
NSString *userName = [[alertView textFieldAtIndex:0] text];
NSString *userPwd = [[alertView textFieldAtIndex:1] text];


[self addUserData:[userName lowercaseString] userPwd:userPwd];
}

if ([alertView.title isEqual:@"你确定删除域名:"] && (buttonIndex == 1)) {

}


//NSLog(@"%@", alertView.title);
//NSLog(@"%ld", (long)buttonIndex);
}



#pragma mark 添加用户数据
-(void)addUserData:(NSString *)userName userPwd:(NSString *)userPwd
Expand Down

0 comments on commit 53ad164

Please sign in to comment.