代码空间

摘要(Abstract)

iOS是由苹果公司开发的移动操作系统 [1] 。苹果公司最早于2007年1月9日的Macworld大会上公布这个系统,最初是设计给iPhone使用的,后来陆续套用到iPod touch、iPad以及Apple TV等产品上。iOS与苹果的Mac OS X操作系统一样,属于类Unix的商业操作系统。原本这个系统名为iPhone OS,因为iPad,iPhone,iPod touch都使用iPhone OS,所以2010WWDC大会上宣布改名为iOS(iOS为美国Cisco公司网络设备操作系统注册商标,苹果改名已获得Cisco公司授权)。 2016年1月,随着9.2.1版本的发布,苹果修复了一个存在了3年的漏洞。该漏洞在iPhone或iPad用户在酒店或者机场等访问带强制门户的网络时,登录页面会通过未加密的HTTP连接显示网络使用条款。在用户接受条款后,即可正常上网,但嵌入浏览器会将未加密的Cookie分享给Safari浏览器。利用这种分享的资源,黑客可以创建自主的虚假强制门户,并将其关联至Wi-Fi网络,从而窃取设备上保存的任何未加密Cookie。

主题(Topic)



项目(Project)

0) {//如果取词字典里有数据 NSMutableDictionary *tempDic = _selectRangeDic;//把取词字典传给临时字典 int i = 0; for (NSString *wordKey in [tempDic allKeys]) { i++; if ([wordKey isEqualToString:wordLocation]) {//如果取词字典里已经存在此单词 [_selectRangeDic removeObjectForKey:wordLocation];//从字典里移除此元素 //恢复单词原本颜色 [textView.textStorage addAttribute:NSForegroundColorAttributeName value:[Constants highLightColor] range:_selectionRange];//前景色 break; } if (tempDic.count == i) {//如果循环到了最后一个,说明取词字典不存在此单词 [_selectRangeDic setObject:self.selectWord forKey:wordLocation];//把取词的位置与内存存入字典 //变为红色 [textView.textStorage addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:_selectionRange];//前景色 } } }else{//如果取词数组没数据 [_selectRangeDic setObject:self.selectWord forKey:wordLocation]; //变为红色 [textView.textStorage addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:_selectionRange];//前景色 //[textView.textStorage addAttribute:NSBackgroundColorAttributeName value:[UIColor clearColor] range:_selectionRange ];//背景色 } } NSString * sepratorString = @" ,,。.?!:\"“”-()'‘"; NSCharacterSet * sepratorSet = [NSCharacterSet characterSetWithCharactersInString:sepratorString]; //根据标点符号拆分成数组 NSMutableArray * splitStr = [textView.text componentsSeparatedByCharactersInSet:sepratorSet]; NSLog(@"splitStr拆分以后 === %@",splitStr); //去掉拆分以后的数组中出现的""元素,不知道怎么出现的""元素。 NSArray *array = [NSArray arrayWithArray:splitStr]; for (NSString *item in array) { if ([@"" isEqualToString: item]) { [splitStr removeObject:item]; } } NSLog(@"splitStr === %@",splitStr); _wordCount = (int)splitStr.count;//单词总数 //得分 _wisdomLearnScore = 100 - _selectRangeDic.count * 100/_wordCount; NSLog(@"智慧化学习得分为:%ld",(long)_wisdomLearnScore); UITableViewCell *cell = (UITableViewCell *)[_repeatView.repeatTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:sen_num]]; if (_selectRangeDic.count > 0) {//如果取词数组有数据,则显示提交按钮 //显示提交按钮 for (UIButton *submitBtn in [cell.contentView subviews]) { if (submitBtn.tag == 5) { submitBtn.hidden = NO; } } }else{ //隐藏提交按钮 for (UIButton *submitBtn in [cell.contentView subviews]) { if (submitBtn.tag == 5) { submitBtn.hidden = YES; } } } _userAnswerStr = @""; //取词拼接成字符串 for (NSString *wordKey in [_selectRangeDic allKeys]) { NSString *wordValue = [_selectRangeDic objectForKey:wordKey]; _userAnswerStr = [NSString stringWithFormat:@"%@ %@",_userAnswerStr,wordValue]; } NSLog(@"%@",_userAnswerStr); for (UILabel *nLabel in [cell.contentView subviews]) { if (nLabel.tag == 4){//请在句中点击未听懂的单词/展开时的中文 nLabel.text = _userAnswerStr; [nLabel setTextColor:[UIColor redColor]]; } } }" class="topic-tag topic-tag-link"> fanjiduo/-Pick-word-Change-color