Tag: ios7

使用pickerView填充多个部分tableView

我有一个tableview的数据从一个pickerView(3列)中select。这里是代码: – (void)viewDidLoad { [super viewDidLoad]; //PickerView content and sort them for displaying Number=@[@"Trans",@"2005",@"2006",@"2007",@"2008",@"2009",@"2010",@"2011",@"2012",@"2013",@"2014",@"2015",@"2016"]; Season=@[@"Spring",@"Summer",@"Fall"]; Course=@[@"CHEM1100 General Chem I",@"CHEM2100 General Chem II",@"CHEM3511 Org Chem",@"CHEM3521 Org Chem II"]; Course =[Course sortedArrayUsingSelector:@selector(compare:)]; Number =[Number sortedArrayUsingSelector:@selector(compare:)]; Season =[Season sortedArrayUsingSelector:@selector(compare:)]; _tableView.delegate = self; _tableView.dataSource = self; } 为了填充tableView,我使用了一个button,当button被按下时,pickerView的select将把数据发送到tableView – (IBAction)addCourse:(UIButton *)sender { NSInteger numRow=[picker selectedRowInComponent:kNumComponent];//0=1st,1=2nd,etc NSInteger SeaRow=[picker selectedRowInComponent:kSeaComponent];//0=fall,1=spring,2=summer NSInteger […]

FacebookgraphicsApi风扇页面照片上传(IOS)

我有一个应用程序,即时上传照片,并试图添加上载到用户的Facebook粉丝页面(他们pipe理)的能力。 我遇到的问题是,我可以成功地将照片上传到粉丝页面,但粉丝页面时间轴上没有显示,只是在粉丝页面的“最近的post”部分显示。 我显然不能正确地上传这些图片。 这是我的代码: ACAccountType * accountType = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; [_accountStore requestAccessToAccountsWithType:accountType options:@{ACFacebookAppIdKey: @"XXXXXXXXXXXX", ACFacebookPermissionsKey : @[@"photo_upload",@"publish_stream", @"publish_actions", @"manage_pages"], ACFacebookAudienceKey : ACFacebookAudienceEveryone} completion:^(BOOL granted, NSError *error) { if (granted) { NSArray * accounts = [_accountStore accountsWithAccountType:accountType]; NSDictionary *fanPages = [[NSUserDefaults standardUserDefaults] objectForKey:FACEBOOK_PREF_FAN_PAGES_IDS]; //if using fan pages if (fanPages.count) { for (id key in fanPages) { […]

UIPicker和UIActionsheet不再使用iOS7

您好我的用户界面select器不再适用于iOS7,它popup,但它是空白的。 只发生在iOS7上。 //picker -(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ animationsLabel.text = [optionsArray objectAtIndex:[picker selectedRowInComponent:0]]; if (pickerView==animationsPicker) { animationsLabel.text = [optionsArray objectAtIndex:[animationsPicker selectedRowInComponent:0]]; } } -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ return 1; } -(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{ return [optionsArray count]; } -(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{ return [optionsArray objectAtIndex:row]; NSLog(@"title options array %lu",(unsigned long)optionsArray.count); } 而行动: -(IBAction)animationActionSheet:(id)sender { UIActionSheet *selectPopup = [[UIActionSheet […]

实现500MB + WebSQL iOS Safari存储

有没有人有iOS7的主屏幕Web应用程序的“无限制”WebSQLfunction的任何数据? 使用存储滥用者我已经能够在我的主屏幕Safari Web应用程序中持续存储450MB,直到它在启动时不断崩溃。 我注意到它也不会要求用户许可,这太棒了。 还有人还有其他的经验吗? 好奇看看真正的上限是多less。

iPad应用程序界面方向在启动应用程序后已更改

我正在应用程序。 应用程序的方向是风景,但应用程序运行后,应用程序的界面方向改变界面和旋转。 启动屏幕以正确的方式显示(横向)。 我使用ios7的应用程序是代码为ios5我认为有一些不赞成的API问题,例如shouldAutorotateToInterfaceOrientation机器人调用,因为这是没有更多的最新ios

故事板UI元素不会出现在Xcode 5中

我已将iPad应用程序从iOS 6转换到iOS 7,并且必须closures自动布局,否则当我select查看故事板时,整个应用程序将崩溃。 现在我可以查看它,所有的元素都不会出现在每个故事板屏幕上。 屏幕在那里,但它们是空白的(白色)。 编辑表示他们在那里,但我根本看不到他们。

为UIImageview设置Uianimation和Touch Event

我工作在一个项目,它需要animation从一个地方到另一个图像我完成,但我的问题是,当我animation我没有得到该UIImageview的任何触摸事件。任何知道请尽快解决。 – (void) imageSpawn { NSArray *images= [NSArray arrayWithObjects:[UIImage imageNamed:@"fish_right1.png"], [UIImage imageNamed:@"fish_right2.png"], [UIImage imageNamed:@"fish_right3.png"], [UIImage imageNamed:@"fish_right4.png"], [UIImage imageNamed:@"fish_right14.png"], [UIImage imageNamed:@"fish_right15.png"], [UIImage imageNamed:@"fish_right20.png"], nil]; int currentImageIndex=0; [UIView animateWithDuration:2.0 delay:0.0 options:UIViewAnimationOptionAllowUserInteraction animations:^{ [self.first_fish setImage:[images objectAtIndex:currentImageIndex] ]; }completion:Nil ]; UITapGestureRecognizer *tapped = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(ballTapped:)]; tapped.numberOfTapsRequired = 1; [rocket addGestureRecognizer:tapped]; [rocket setUserInteractionEnabled:YES]; } -(void)ballTapped:(UIGestureRecognizer *)gesture { //here […]

当alertview存在时,iOS 7 ViewController不旋转

iOS 7 Viewcontroller当alertview存在时不旋转。 但我的状态栏正在改变为设备的方向。 但是,在最近的警报定位中,视图仍然冻结

在iOS 7.1中,UISearchBar的文本和占位符属性不再起作用

从iOS 7.1开始,我一直无法读取文本,也没有设置UISearchBar的占位符。 text属性始终返回nil,search栏始终是空白的白色矩形。 在iOS 7.0及以下,我没有这样的问题。 7.1是否需要我以不同的方式对待UISearchBars以使text和placeholder工作? – (void)viewDidLoad { [super viewDidLoad]; self.searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 44.0)]; self.searchBar.placeholder = @"placeholder doesn't work in 7.1"; [self.view addSubview:self.searchBar]; self.button = [[UIButton alloc] initWithFrame:CGRectMake(0.0, 44.0, 100.0, 44.0)]; self.button.backgroundColor = [UIColor redColor]; [self.button setTitle:@"print text" forState:UIControlStateNormal]; [self.button addTarget:self action:@selector(printSearchText) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:self.button]; } – (void)printSearchText { NSLog(@"print […]

当closures视图启动位置服务通知错误发生

我创build了一个使用这个项目的小应用程序,因为它的核心是: https://github.com/dsdavids/TTLocationHandler 它一直工作得很好,直到我已经移动从应用程序中的另一个视图移动位置服务。 什么应用程序正在做:当它启动时,您可以点击开始button和( 在模拟器位置必须启用 )在移动的地图上的移动路线显示。 当我在第二个视图中移动开始行动时,问题出现了。 在第二个视图中,我只想启动位置服务并closures它。 问题是,当我开始定位在第二个视图我得到错误(应用程序崩溃EXC_BAD )在这里: TTLocationHandler … dispatch_async(dispatch_get_main_queue(), ^{ if (OUTPUT_LOGS) NSLog(@"Sending notification out"); NSNotification *aNotification = [NSNotification notificationWithName:LocationHandlerDidUpdateLocation object:[locationToSave copy]]; [[NSNotificationCenter defaultCenter] postNotification:aNotification]; }); … 我认为这是因为我closures了第二个视图(查看启动服务), TTLocationHandler仍然试图发送一些东西。 为了更好地理解我的问题,我已经在git hub上添加了项目: https://github.com/1110/common-location-features 您可以下载它,并从第二个视图运行启动服务,当closures该视图的应用程序将在几秒钟内崩溃。 如果有人能find一点时间告诉我我在做什么错,我会非常感激,因为我确信这是一件小事,我可能做错了。 整个代码在SecondViewController.m 谢谢