Tag: ios5

Google Drive iOS SDK:显示取消loginbutton

我在iOS应用程序上工作,我使用Google驱动器来访问我的文件,login和列表文件工作正常,但我只是问我可以如何添加一个取消buttonlogin界面提供的谷歌驱动器sdk看图像怒吼 因为,你看到没有办法做一个cancel或go backbutton。 这是我的代码 // verify if the user is already connected or not – (void)checkIfIsConnected { // Check for authorization. GTMOAuth2Authentication *auth = [GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName:kKeychainItemName clientID:kClientID clientSecret:kClientSecret]; if ([auth canAuthorize]) { [self isAuthorizedWithAuthentication:auth]; }else { [self ConnectToDrive]; } } – (GTLServiceDrive *)driveService { static GTLServiceDrive *service = nil; if (!service) { service = [[GTLServiceDrive […]

禁用UITextviewselect文本和复制/粘贴菜单

我想禁用复制/粘贴菜单,我在UITextView中使用多个超链接,并希望只禁用菜单的HTML标记。 我的texview图像

如何评估ios中的string方程

有没有办法解决在ios的string方程? 例如 input: NSString * str =@"1+2"; 输出: NSInteger result = 3 //即来自str的1 + 2的总和 如何去做到这一点,并得到预期的结果! 请帮忙!

在iOS中捕获Wi-Finetworking更改事件

当用户连接到iOS应用程序中的特定WiFinetworking时,是否有任何方法来捕获事件? 即使可以使用任何不需要超级用户权限(监狱rest)的私人图书馆也可以。 我只想捕捉连接的SSID的变化事件。

苹果Mach-O链接器错误,我不知道该怎么办

我无法编译我的项目的设备或模拟器了。 我得到了13个苹果Mach-O-Linker错误。 这一切都是在我尝试使用sharekit失败之后开始的。 这是来自错误的日志: ld: warning: directory not found for option '-F/Users/bbrandy95/Documents/Broken Brandsonic Web Projects/Brandsonic Web mobile/../../Downloads/0.2.1gm1/iphoneos4.0/System/Library/Frameworks' Undefined symbols for architecture armv7: "_OBJC_CLASS_$_NSURLRequest", referenced from: objc-class-ref in Brandsonic_Web_mobileAppDelegate.o objc-class-ref in Brandsonic_Web_mobileViewController.o "_OBJC_CLASS_$_NSAutoreleasePool", referenced from: objc-class-ref in main.o "_objc_msgSendSuper2", referenced from: -[Brandsonic_Web_mobileAppDelegate dealloc] in Brandsonic_Web_mobileAppDelegate.o -[Brandsonic_Web_mobileViewController didReceiveMemoryWarning] in Brandsonic_Web_mobileViewController.o -[Brandsonic_Web_mobileViewController dealloc] in Brandsonic_Web_mobileViewController.o "_objc_setProperty", referenced from: […]

从AVAssetReaderOutput读取数据时iOS 5.0崩溃

我有这个代码片段用于从AVAssetReaderOutput读取数据,该方法在iOS 4.0中工作正常,但是在5.0中它崩溃到最后与不良访问,不知道为什么,任何人有任何input? AVAssetReaderOutput *output=[myOutputs objectAtIndex:0]; int totalBuff=0; while(TRUE) { CMSampleBufferRef ref=[output copyNextSampleBuffer]; if(ref==NULL) break; //copy data to file //read next one AudioBufferList audioBufferList; NSMutableData *data=[[NSMutableData alloc] init]; CMBlockBufferRef blockBuffer; CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer(ref, NULL, &audioBufferList, sizeof(audioBufferList), NULL, NULL, 0, &blockBuffer); for( int y=0; y<audioBufferList.mNumberBuffers; y++ ) { AudioBuffer audioBuffer = audioBufferList.mBuffers[y]; Float32 *frame = audioBuffer.mData; NSLog(@"Gonna write %d", […]

在ios 5 MP音乐播放器控制器中出现错误的播放状态

MP音乐播放器中出现错误的播放状态。 在播放歌曲时我正在暂停状态。 我的应用程序工作正常在ios 4.but但我有这个问题在iOS 5中。任何人都可以帮助我? 我的代码在这里。 [musicPlayer stop]; if (userMediaItemCollection) { userMediaItemCollection=nil; } musicPlayer.nowPlayingItem=nil; userMediaItemCollection=[MPMediaItemCollection collectionWithItems:[mediaItemCollection items]]; [musicPlayer setQueueWithItemCollection:userMediaItemCollection]; [musicPlayer setNowPlayingItem: [[userMediaItemCollectionitems]objectAtIndex:indexOfCurrentObject]]; [self enablePrevAndNextButtons]; [musicPlayer play]; } -(void)playbackStateDidChanged:(NSNotification *)notification { if (musicPlayer.playbackState!=MPMusicPlaybackStatePlaying) { [playPauseButton setBackgroundImage:[UIImage imageNamed:@"play_iPad.png"] forState:UIControlStateNormal]; } else if(musicPlayer.playbackState==MPMusicPlaybackStatePlaying) { [playPauseButton setBackgroundImage:[UIImage imageNamed:@"pause_iPad.png"] forState:UIControlStateNormal]; }

在UICollectionView中复制标注

我有一个UICollectionView与UIImageView在每个单元格中,现在我想添加复制标注,就像Photos.app中: 我在UICollectionViewDelegate中看到了这个方法: – (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath { return YES; } 经过几分钟的研究,我发现UIMenuController类,据我所知,我必须与它合作得到菜单,但无论如何,我认为必须有更简单的方法,然后创buildUIGestureRecognizer,创build,定位等我UIMenu。 我在正确的轨道上? 你怎么能实现这个function?

iOS KeychainItemWrapper不更新

我刚刚发现我的应用程序有一个有趣的问题。 在应用程序中,我将用户的用户名和密码保存到钥匙串中。 keychainWrapper = [[KeychainItemWrapper alloc] initWithIdentifier:@"MyLoginPassword" accessGroup:nil]; [keychainWrapper setObject:usernameField.text forKey:(id)kSecAttrAccount]; [keychainWrapper setObject:passwordField.text forKey:(id)kSecValueData]; 当这个代码在Debug中运行时,它似乎工作得很好。 它每次更新,我以后可以从钥匙链中检索项目。 当它在发行版中运行时,钥匙串永远不会被更新。 我已经validation,是这两行代码都在两个版本中。 我正在使用Xcode 4.2和iOS5 SDK,并在装有iOS5的iPad 2上运行应用程序。

点击或滚动后,asynchronous下载的图像只出现在UITableView中

我成功地从博客文章加载我的UITableViewasynchronous缩略图。 我遇到的问题是,只有当我点击单元格或向下滚动时才会显示图像。 当我点击单元格时,图像出现在左侧,将标题和字幕推向右侧。 当我向下滚动时,图像出现在细胞应该显示的位置。 这是我的代码(我正在使用AFNetworking): #import "UIImageView+AFNetworking.h" – (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return posts.count; } – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; } NSDictionary *post = [posts objectAtIndex:indexPath.row]; NSString *postpictureUrl = [post objectForKey:@"picture"]; [cell.imageView […]