Tag: ios7.1

dequeueReusableSupplementaryViewOfKind崩溃在ios 7.1 – 索引0超出界限为空数组

具有2个部分的收集视图。 section 1: rows: 0 section 2: rows: 20 有像以下注册的网友: [self.collectionView registerNib:[UINib nibWithNibName:@"MissionDetailHeader" bundle:nil] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"MissionDetailHeader"]; [self.collectionView registerNib:[UINib nibWithNibName:@"MissionDetailHeaderPic" bundle:nil] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"MissionDetailHeaderPic"]; 在ios8上完美工作 – 但在7.1上它总是在dequeueReusableSupplementaryViewOfKind上崩溃: – (UICollectionReusableView*)collectionView:(UICollectionView*)cv viewForSupplementaryElementOfKind:(NSString*)kind atIndexPath:(NSIndexPath*)indexPath { UICollectionReusableView* header; NSLog(@"LOAD SECT: %@", indexPath); if (indexPath.section == 0) { header = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"MissionDetailHeaderPic" forIndexPath:indexPath]; } else { header = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"MissionDetailHeader" […]

在第四行更改内容时,uitableview单元格更改第一行中的内容

我有一个特定单元格的手势桌面视图。 在tableview加载后,我滚动到第四行,并向左滑动显示一些内容,其工作正常。 但之后,当我回到第一行,它也显示在第四行相同的内容。 当我运行这个代码与ios8,其工作正常。以上问题只发生在我运行这个在ios7中。 我的代码如下: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { SampleViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"]; if(cell == nil) { cell = [[SampleViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"]; } NSMutableDictionary *cellData = [self.databaseCall transactionFromDatabase:indexPath.row Id:self.Id andStageId:self.stageId]; [self setSelectedSegmentColor:cell.repeat]; cell.Description.text = self.Name; cell.actionDescription.text = self.Name; cell.tipsDescription.text = [cellData objectForKey:@"tipsDescription"]; UIImage *cellImage = [UIImage imageNamed:[cellData objectForKey:@"categoryImage"]]; NSLog(@"%@", [cellData […]

在whatsapp – 目标c上分享video

在iOS 7.1.1上,我可以通过Whatsapp上的这段代码分享图片。 if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]]){ UIImage * iconImage = [UIImage imageNamed:@"image.png"]; NSString * savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/whatsAppTmp.wai"]; [UIImageJPEGRepresentation(iconImage, 1.0) writeToFile:savePath atomically:YES]; self.docController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]]; self.docController.UTI = @"net.whatsapp.image"; self.docController.delegate = self; //[self.docController setAnnotation:@{@"WhatsappCaption" : @"https://itunes.apple.com/us/app/epic-ar/id535122470?ls=1&mt=8"}]; [self.docController presentOpenInMenuFromRect:CGRectMake(0, 0, 0, 0) inView:appDelegate.window.rootViewController.view animated: YES]; } 但我也想分享video,我遵循Wahtsapp教程的教程 但是videopath的代码又怎么样呢? 我的意思是,UIImage对象显示video的替代对象是什么? 另外,我可以分享“链接”? 谢谢,

swift animateWithDuration在iOS 7中不起作用

我有一个在iOS 8.1中运行正常的animation,但在iOS 7.1中,button只出现在没有animation的地方。 该button的前导,尾部和底部约束为0,高度约束为80.约束条件在故事板中设置。 在viewWillAppear方法中,我将底部约束更改为-80,以便在开始时不会看到。 当用户按下一个button,button应该动起来,我运行这个方法: func animateCtaUp() { self.ctaView.layoutIfNeeded() UIView.animateWithDuration(0.5, delay: 0, options: .CurveEaseOut, animations: { self.ctaViewBottomConstraint.constant = 0 self.ctaView.layoutIfNeeded() }, completion: { finished in }) }

GPUImage混合filter

我正在尝试将混合filter应用于2张图片。 我最近更新GPUImage到最后的版本。 为了使事情变得简单,我修改了SimpleImageFilter的例子。 这里是代码: UIImage * image1 = [UIImage imageNamed:@"PGSImage_0000.jpg"]; UIImage * image2 = [UIImage imageNamed:@"PGSImage_0001.jpg"]; twoinputFilter = [[GPUImageColorBurnBlendFilter alloc] init]; sourcePicture1 = [[GPUImagePicture alloc] initWithImage:image1 ]; sourcePicture2 = [[GPUImagePicture alloc] initWithImage:image2 ]; [sourcePicture1 addTarget:twoinputFilter]; [sourcePicture1 processImage]; [sourcePicture2 addTarget:twoinputFilter]; [sourcePicture2 processImage]; UIImage * image = [twoinputFilter imageFromCurrentFramebuffer]; 返回的图像是nil应用一些断点我可以看到filter内部的方法失败- (CGImageRef)newCGImageFromCurrentlyProcessedOutput的问题是, framebufferForOutput是nil.Im使用模拟器。 我不明白为什么它不工作。

标注放大iOS7后打开错误的视图

在我的应用程序中一切正常,除了一件事:放大和缩小后,看到整个地图,一些标注打开错误的detailview。 我不知道如果我错过了一些代码或其他。 使用Xcode 5.1.1 for iOS7。 这是我目前所掌握的: Annotation.h #import <Foundation/Foundation.h> #import <MapKit/MapKit.h> @interface Annotation: NSObject <MKAnnotation> @property (nonatomic, assign) CLLocationCoordinate2D coordinate; @property (nonatomic, copy) NSString *title; @property (nonatomic, copy) NSString *subtitle; @end Annotation.m #import "Annotation.h" @implementation Annotation @synthesize coordinate,title,subtitle; @end MapView.h #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> @interface Nameofthemap : UIViewController <MKMapViewDelegate> @property (strong, nonatomic) IBOutlet MKMapView […]

UITextField TapGesture不响应iOS 7.1

我有一个uitextfield编程添加到查看。 我需要显示一个UIPickerview,当我点击它,我已经添加了一个UITapgestureRecognizer的用户和交互也启用。 哪个工作正常,直到IOS 7.0。 但是,当我更新到IOS 7.1,而不是被调用。

与currentPlaybackTime和MPMusicPlayerController和iOS 7.1的问题。

在iOS 7.1中使用MPMusicPlayerController设置currentPlaybackTime时遇到问题。 我曾经能够简单地做到以下几点: MPMusicPlayerController *iPodController = [MPMusicPlayerController applicationMusicPlayer]; iPodController.currentPlaybackTime = 30.0; [iPodController play]; 音乐播放器将会寻找30秒的时间和播放。 从iOS 7.1开始,情况并非如此。 如果我做到以下几点: [iPodController play]; iPodController.currentPlaybackTime = 30.0; 那么它“可能”会跳30秒。 非常不一致。 这用于所有以前的iOS版本。 只是想知道如果有人有工作。 谢谢!

UIPickerView iOS7.1中未定义的键NSException

我在7.0版本中没有出现iOS 7.1模拟器中的exception。 它似乎在核心的某处处理,因为它只触发exception引发断点。 它不会login到控制台或崩溃。 这在滚动UIPickerView中的选项时发生。 没有有意义的回溯(从UIApplicationMain到objc_exception_throw),但是在debugging器中抛出时检查exception显示: [<UIPickerView 0xb9a6700> valueForUndefinedKey:]: this class is not key value coding-compliant for the key _mode. 我在我的项目searchmode , setMode: , mode =但我不认为我是一个设置这个。 其他人遇到这个? 我想如果没有崩溃的应用程序是好的,但它给了我一个恐慌,我宁愿采取行动,以防止它被抛出。 如果我有更多的时间,我会尝试在testing项目中进行隔离并跟进。 编辑:更好的回溯: thread #1: tid = 0x10975c, 0x02590909 libc++abi.dylib`__cxa_throw, queue = 'com.apple.main-thread, stop reason = breakpoint 1.2 frame #0: 0x02590909 libc++abi.dylib`__cxa_throw frame #1: 0x01b1d9fc libobjc.A.dylib`objc_exception_throw + 323 […]

ios7.1:推送通知徽章更新问题

我已经在我当前的项目中设置了Push Notification 。 我已经按照推送通知所需的所有指令。 在[标签:ios7],但在7.1我工作得很好,当我的应用程序在后台模式时,徽章更新问题。 我的代码如下: – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; } – (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error { NSLog(@"Failed to get token, error: %@", error); } – (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken { NSString *str = [NSString stringWithFormat:@"%@",deviceToken]; NSLog(@"%@",str); self.deviceToken = [NSString stringWithFormat:@"%@",str]; NSLog(@"dev — %@",self.deviceToken); self.deviceToken = [self.deviceToken stringByReplacingOccurrencesOfString:@"<" withString:@""]; […]