小编Noo*_*oor的帖子

Springboard无法启动错误3,0,4等的应用程序

为什么Xcode无法在模拟器中启动应用程序?

我在网上经历了很多解决方案,但有时他们会工作,有时他们却没有.

我多次解决问题的方法是退出模拟器,删除应用程序,

重置模拟器的内容设置,并清理和构建.

但为什么我每次都要尝试这些(所有)这些.

Xcode通过拥有所有这些错误来消耗开发时间.

甚至有时它会丢失连接,应用程序会意外退出错误.

苹果公司在做什么?他们刚刚发布了包含所有这些错误的Xcode.

Xcode 4.5或4.6对我来说没有这些问题.

最后,我要求所有人提供任何好的解决方案,以节省解决这些血腥问题的时间.

xcode xcode5

20
推荐指数
2
解决办法
1万
查看次数

angularjs:$ timeout使用率(服务内部)

我正在尝试制作一个小通知器,通知典型情况:需要授权,更改保存等.通知显示3秒钟后消失,如果用户没有点击它(如果通知点击,它立即消失).文档资料不多.我该怎么用$timeout,close();3秒后打电话?我怎样才能将变量(nId)放入函数中?我(*function(){return function(){}}*)在默认情况下尝试使用闭包setTimeOut(),但未成功.

myApp.controller('noticesCtrl',
    function noticesCtrl($scope, $rootScope, noticesData){
        $rootScope.notices = [];
        $scope.closeNotice = function(nId){
            noticesData.close(nId);
        };
    });

myApp.factory('noticesData', function($rootScope, $timeout){
    return{
        add: function(type, text){
            var nId = $rootScope.notices.length + 1;
            $rootScope.notices.push({id: nId, type:type, text:text+nId});
            // call close function with 3sec. delay; how?
        },
        close: function(nId){
            angular.forEach($rootScope.notices, function(notice, key){
                if(notice.id == nId){
                    $rootScope.notices.splice(key,1);
                }
            });
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

service closures timeout angularjs

8
推荐指数
1
解决办法
2万
查看次数

如何在tableView中添加5个不同的自定义单元格

我想在我的tableview中显示来自web的不同数据但是我没有得到如何在表的一个部分中的单独单元格中显示它们可以帮助我在一个单元格中显示

cell.textLabel.text=app.i_name;
Run Code Online (Sandbox Code Playgroud)

在第二个细胞中

cell.textLabel.text=app.i_phone;
Run Code Online (Sandbox Code Playgroud)

在第三个细胞中

cell.textLabel.text=app.i_hours;
Run Code Online (Sandbox Code Playgroud)

在第四个细胞中

cell.textLabel.text=app.i_address;
Run Code Online (Sandbox Code Playgroud)

在第五个细胞中

cell.textLabel.text=app.i_email;
Run Code Online (Sandbox Code Playgroud)

我索引行的单元格为

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    static NSString *CellIdentifier = @"Single Cell";
    SingleCell *cell =(SingleCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];


    if (cell == nil) {
        UIViewController *c = [[UIViewController alloc] initWithNibName:@"SingleCell" bundle:nil];
        cell = (SingleCell *) c.view;
        //[c release];

    }
appDC * application = [dataArray objectAtIndex:[indexPath row]];

        //cell.namelbl.text=application.application_name;


return cell;
}
Run Code Online (Sandbox Code Playgroud)

iphone uitableview ios ios5

7
推荐指数
1
解决办法
1016
查看次数

迁移到 Angular 13 后 webpack-dev-server 出现错误

从 Angular 12 迁移到 Angular 13 后,我在控制台中收到以下错误:webpack-dev-server 错误,index.js 第 558 行。新行:事件对象,isTrusted true,类型“错误”,目标 WebSocket,currentTarget WebSocket,eventPhase 2,省略号

另外,如果我更改代码中的某些内容,浏览器不会自动重新加载。

注意:我没有对 webpack 进行额外的配置。

这是我的包版本package.json

  "devDependencies": {
    "@angular-devkit/build-angular": "~13.1.2",
    "@angular-eslint/builder": "12.3.1",
    "@angular-eslint/eslint-plugin": "12.3.1",
    "@angular-eslint/eslint-plugin-template": "12.3.1",
    "@angular-eslint/schematics": "^12.3.1",
    "@angular-eslint/template-parser": "12.3.1",
    "@angular/cli": "~13.1.2",
    "@angular/compiler-cli": "~13.1.1",
    "@angular/language-service": "~13.1.1",
    "@biesbjerg/ngx-translate-extract": "^7.0.4",
    "@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
    "@types/file-saver": "^2.0.3",
    "@types/hashids": "^2.0.1",
    "@types/moment-timezone": "^0.5.12",
    "@types/uuid": "^8.3.3",
    "@typescript-eslint/eslint-plugin": "4.31.0",
    "@typescript-eslint/parser": "4.31.0",
    "autoprefixer": "^10.3.3",
    "eslint": "^7.32.0",
    "eslint-plugin-import": "2.24.2",
    "eslint-plugin-jsdoc": "36.0.8",
    "eslint-plugin-prefer-arrow": "1.2.3",
    "hashids": "^2.2.8",
    "invariant": "^2.2.4",
    "postcss": "^8.1.0",
    "typescript": "~4.5.4",
    "webpack-bundle-analyzer": "^4.4.2"
  }
Run Code Online (Sandbox Code Playgroud)

browser webpack angular

7
推荐指数
1
解决办法
6908
查看次数

Swift:自定义单元格中的IBoutlet为零

我无法弄清楚为什么没有输出这个自定义单元格.

我在故事板中设置了自定义单元格(没有笔尖).我有一个文本字段和2个标签,当我尝试在自定义单元格类中访问它们时为nil.我几乎可以肯定我已经把所有东西都搞定了,但仍然没有.

我已经在故事板中选择了我的表格单元格并将自定义类设置为TimesheetTableViewCell 我也控制了单击该表并将数据源和委托设置为TimesheetViewController

我的自定义单元类:

import UIKit

class TimesheetTableViewCell: UITableViewCell {

@IBOutlet var duration: UITextField!
@IBOutlet var taskName: UILabel!
@IBOutlet var taskNotes: UILabel!

required init(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
}

override init?(style: UITableViewCellStyle, reuseIdentifier: String!) {
    super.init(style: style, reuseIdentifier: reuseIdentifier)
    println("Cell's initialised")// I see this
    println(reuseIdentifier)// prints TimesheetCell
}


override func setSelected(selected: Bool, animated: Bool) {
    super.setSelected(selected, animated: animated)
}

func setCell(duration: String, taskName: String, taskNotes: String){
    println("setCell called")
    self.duration?.text = duration
    self.taskName?.text = taskName
    self.taskNotes?.text = …
Run Code Online (Sandbox Code Playgroud)

custom-cell ios swift

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

如何使用UIWebView下载视频

我想使用网络视图下载视频,但我没有得到如何下载它?我的视频链接在这里

我正在使用的播放视频的示例代码是

-(void)embedYouTubeInWebView:(NSString*)url theWebView:(UIWebView *)aWebView {
    NSString* html = [NSString stringWithFormat:@"%@", url];
    [aWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:html]]];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
   [self embedYouTubeInWebView:@"http://player.vimeo.com/video/32983838" theWebView:myWebView];
    // Do any additional setup after loading the view, typically from a nib.
}
Run Code Online (Sandbox Code Playgroud)

有人可以帮我下载这个视频吗?

iphone video xcode uiwebview ios

5
推荐指数
2
解决办法
3316
查看次数

在UICollectionView单元格中停止动画

我有一个定时器,每秒触发一次以刷新UICollectionView单元格上的数据,有时(特别是当我旋转设备时),单元格开始每秒闪烁一次.我想停止这个眨眼动画.但是,我在集合视图单元格中有另一个动画,所以我不想像这个代码那样禁用它上面的所有动画:

[UIView setAnimationsEnabled:NO];

[collectionView performBatchUpdates:^{
    [collectionView reloadItemsAtIndexPaths:indexPaths];
} completion:^(BOOL finished) {
    [UIView setAnimationsEnabled:YES];
}];
Run Code Online (Sandbox Code Playgroud)

objective-c uiviewanimation ios uicollectionview

5
推荐指数
1
解决办法
1199
查看次数

用于基于位置的图像的Flickr API

我想在iOS中的搜索字段中输入城市名称时获取城市的图像.我正在使用flickr API,但每当我输入任何经度和纬度值时,我只返回一个空数组.我该怎么办.我正在使用此网址:

http://api.flickr.com/services/rest/?method=flickr.photos.geo.photosForLocation&api_key=e3d577010e5979a2ad2a22714abd901e&lat=40.6700&lon=73.9400&format=json&nojsoncallback=1&auth_token=72157638668602974-e1a3a3aa1e6d3dd8&api_sig=a0233b016c863b1662aeb21a664c351a

请告诉我该怎么办.任何帮助赞赏

iphone flickr latitude-longitude ios

5
推荐指数
1
解决办法
2823
查看次数

IAP 自动续订订阅到期前手动续订

我正在开发IAP Auto Renewable Subscription应用程序,该应用程序会在订阅到期后自动续订。

如果订阅已经过期,我给了一个续订按钮来续订。(如果用户从他的 iTunes 帐户中取消了自动续订订阅可能会过期。)所以这里有几种情况:

  1. 如果 Auto Renewable Subscription 正在运行并且用户仍然错误地尝试续订会发生什么情况。
  2. 如果自动续订订阅从用户的 iTunes 帐户中停止并且用户试图在它到期之前续订会发生什么。

谢谢你。

objective-c subscription in-app-purchase ios auto-renewing

5
推荐指数
1
解决办法
597
查看次数

将self分配给UITextFieldDelegate适用于iOS 8而不是iOS 7

在过去,我已经完成了UITableView的子类化,并且UICollectonView多次,我将自己分配给委托和数据源,并且它工作正常.

今天我试图创建子类,UITextField并在其中我将自己分配给其委托

self.delegate = self
Run Code Online (Sandbox Code Playgroud)

委托继承自何处UITextFiled.在上面的例子中,这是在iOS 7中永久挂起应用程序,但适用于iOS 8.另一个令人惊讶的事情是,当我尝试从硬件键盘输入文本然后它工作正常但它挂在从On-键入字符屏幕键盘.

可能是什么原因,任何人都可以帮助我理解吗?

uitextfield ios uitextfielddelegate ios7 ios8

5
推荐指数
1
解决办法
158
查看次数