小编Smi*_*iya的帖子

如何使用字典为soap web服务ios存储数组值

这里NsmutableString = textInProgress,count1是计数器管理的.

- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
 {
     NSLog(@"%d",count1);

     // Build the text value
     [textInProgress appendString:string];
     NSLog(@"%@",textInProgress);

     NSLog(@"%d",count1);
     count1=count1+1;
 }
Run Code Online (Sandbox Code Playgroud)
  • 请有人指导我如何在数组中存储这个字符串值?在这里,当我textInProgress在日志中打印时,它返回null值.

输出的一部分: -

2016-02-26 03:29:50.047 Hello_SOAP[3684:118829] 0
2016-02-26 03:29:50.047 Hello_SOAP[3684:118829] (null)
2016-02-26 03:29:50.047 Hello_SOAP[3684:118829] 0
2016-02-26 03:29:50.047 Hello_SOAP[3684:118829] 2
2016-02-26 03:29:50.047 Hello_SOAP[3684:118829] (null)
2016-02-26 03:29:50.047 Hello_SOAP[3684:118829] 2
Run Code Online (Sandbox Code Playgroud)

在任何其他方法中我没有使用此方法,而是没有增加count1变量

soap web-services xml-parsing ios

6
推荐指数
1
解决办法
335
查看次数

如何在没有javascript的情况下验证单选按钮?

我使用了性别单选按钮如下:-

<td><input type="radio" name="gender" value="male" checked required="required"> Male<br>
  <input type="radio" name="gender" value="female"> Female<br>
  <input type="radio" name="gender" value="other"> Other</td>
Run Code Online (Sandbox Code Playgroud)

但是这种“必需的”验证无法在不使用 JavaScript 的情况下对其进行验证。

html validation

4
推荐指数
2
解决办法
8368
查看次数

如何设置和传递在另一个View Objective C中也可访问的变量值

在AppDelegate.h中

@property(strong,nonatomic)NSString *str2;
Run Code Online (Sandbox Code Playgroud)

在ViewController.m中

AppDelegate *c3=[[AppDelegate alloc]init];
c3.str2= @"Hello";

NSLog(@"Output:-%@",c3.str2);
Run Code Online (Sandbox Code Playgroud)

输出:你好

Tableview中的导航代码didselect方法(视图控制器): -

Class2  *c2=[self.storyboard instantiateViewControllerWithIdentifier:@"cl2"];
[self.navigationController pushViewController:c2 animated:YES];
Run Code Online (Sandbox Code Playgroud)

在Class2.m中: -

AppDelegate *c3=[[AppDelegate alloc]init];
NSLog(@"%@",c3.str2);
Run Code Online (Sandbox Code Playgroud)

输出:-null

objective-c ios

0
推荐指数
1
解决办法
66
查看次数

标签 统计

ios ×2

html ×1

objective-c ×1

soap ×1

validation ×1

web-services ×1

xml-parsing ×1