linkedin / linkedin/LayoutTest-iOS
Can't call init with data
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Objective-C
- Star
- 558
- Fork
- 46
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hey! Really excited to get this project working for me.
I have a number of views and view controllers I would like to test. I am using Realm in-memory to create Realm Objects to pass into my inits to instantiate my views and view controllers.
failed: caught "NSInvalidArgumentException", "-[StoriesASDetailViewController initWithStory:]: unrecognized selector sent to instance 0x7fa5fbe07ce0"
No matter what I try, be it a cell or tableviewcontroller, I just keep getting the error above.
Any advice?
`
+(UIView *)viewForData:(NSDictionary *)data reuseView:(UIView *)reuseView size:(LYTViewSize *)size context:(id _Nullable __autoreleasing *)context {
StoryModel *story = [[StoryModel alloc] initWithDictionary:data error:nil];
StoryRealm *local = [[StoryRealm alloc] initWithStoryModel:story];
StoriesASDetailViewController *footer = [[StoriesASDetailViewController alloc] initWithStory:local];
StoryDetailCell *cell = [footer.collectionNode cellForItemAtIndexPath:0];
*context = footer;
return cell;
}
`
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện NSInvalidArgumentException từ entry point viewForData:reuseView:size:context: bằng cách sử dụng StoriesASDetailViewController và lệnh gọi initWithStory: của nó. Kiểm tra initializer hiện có và luồng kiểm thử LayoutTest-iOS; công việc được xem là hoàn tất khi có một cách giải quyết đã được xác nhận và ghi chép để tạo view controller bằng dữ liệu StoryRealm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- objective-c
- Lĩnh vực
- testing
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100