Tag: ios7

Asset Catelog问题与多个目标

我有一个有多个目标的项目。 假设目标被命名为Target-A,Target-B等。 对于每个目标,我都有不同的应用程序图标资产目录。 他们被命名为AppIcon – A,AppIcon – B,并继续为所有的目标。 我已经将相应的资产目录分配给所有目标,但是当我在设备/模拟器上运行时,它只显示Target-A的图标。 对于所有其他目标,它不设置任何图标并显示iOS 7默认的占位符图标。 请帮忙!

UITabBarItem setFinishedSelectedImage:在iOS7中已弃用

setFinishedSelectedImage:withFinishedUnselectedImage:在iOS7中已弃用。 苹果推荐使用UIImageRenderingModeAlwaysOriginal的image和selectedImage setter。 我找不到如何使用UIImageRenderingModeAlwaysOriginal任何示例。 所以这个问题很简单:如何在iOS7中为UITabBarItem设置图像?

如何设置UITabBarItem的未选色调,***包括系统项目***(iOS7)

( 注:我看到有几个类似的问题,但他们都没有看到我想改变定制和系统UITabBarItems的未选定外观的具体问题。) 我正在iOS7中工作。 我有一个button的UITabBar。 其中一些是我的button,一些是系统button。 例: UITabBarItem *searchButton = [[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemSearch tag: navSearchItem]; UITabBarItem *bookMkButton = [[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemBookmarks tag: navBookmarksItem]; UITabBarItem *homeButton = [[UITabBarItem alloc] initWithTitle: @"Home" image: [self tabBarImageNamed: @"home-tab"] tag: navHomeItem]; UITabBarItem *setingButton = [[UITabBarItem alloc] initWithTitle: @"Settings" image: [self tabBarImageNamed: @"settings-tab"] tag: navSettingsItem]; navTabBar.items = @[ searchButton, homeButton, […]

如何设置子视图控制器的topLayoutGuide位置

我正在实现一个自定义的容器,它非常类似于UINavigationController,除了它不包含整个控制器堆栈。 它有一个UINavigationBar,它被限制在容器控制器的topLayoutGuide中,它恰好是顶部20px,这是OK的。 当我添加一个子视图控制器并将其视图放入层次结构中时,我希望在IB中看到它的topLayoutGuide,并用于布置子视图控制器的视图的子视图,使其出现在导航栏的底部。 在相关的文件中有一个要做的事情: 此属性的值特别是查询此属性时返回的对象的length属性的值。 该值受到视图控制器或其封闭容器视图控制器(如导航或选项卡栏控制器)的约束,如下所示: 不在容器视图控制器中的视图控制器约束此属性以指示状态栏的底部(如果可见) 否则指示视图控制器视图的上边缘。 容器视图控制器中的视图控制器不会设置此属性的值。 相反,容器视图控制器限制值以指示: 导航栏的底部,如果导航栏是可见的 状态栏的底部,如果只有一个状态栏是可见的 视图控制器视图的顶部边缘,如果状态栏和导航栏都不可见的话 但是我不太了解如何“限制它的价值”,因为topLayoutGuide和它的长度属性都是只读的。 我已经试过这个代码来添加一个子视图控制器: [self addChildViewController:gamePhaseController]; UIView *gamePhaseControllerView = gamePhaseController.view; gamePhaseControllerView.translatesAutoresizingMaskIntoConstraints = NO; [self.contentContainer addSubview:gamePhaseControllerView]; NSArray *horizontalConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"|-0-[gamePhaseControllerView]-0-|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(gamePhaseControllerView)]; NSLayoutConstraint *topLayoutGuideConstraint = [NSLayoutConstraint constraintWithItem:gamePhaseController.topLayoutGuide attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.navigationBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0]; NSLayoutConstraint *bottomLayoutGuideConstraint = [NSLayoutConstraint constraintWithItem:gamePhaseController.bottomLayoutGuide attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.bottomLayoutGuide attribute:NSLayoutAttributeTop multiplier:1 […]

iOS 7中的进度视图高度

我想增加在iOS 6和以下的进展视图的高度,我正在做这个使用appearence方法 UIImage *progressImage = [[UIImage imageNamed:@"sliderbk-progress.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 4, 0, 5)]; [[UIProgressView appearance] setProgressImage:progressImage]; 但现在在iOS7这个代码不工作,我甚至尝试给下面的代码,但没有用。 任何帮助将是有益的。 谢谢 [[UIProgressView appearance] setFrame:CGRectMake(20, 100, 280, 100)];

模糊屏幕与iOS 7的快照API

我相信NDA已经下降了,所以我可以问这个问题。 我有一个UIView子类: BlurView *blurredView = ((BlurView *)[self.view snapshotViewAfterScreenUpdates:NO]); blurredView.frame = self.view.frame; [self.view addSubview:blurredView]; 到目前为止,它在捕获屏幕方面的工作,但现在我想模糊这个观点。 我究竟如何去做呢? 从我读过的东西中,我需要捕获视图的当前内容(上下文?!),并将其转换为CIImage(否),然后将CIGaussianBlur应用于视图并将其拖回视图。 我到底怎么做? PS视图不是animation,所以它应该是性能明智的。 编辑:这是我迄今为止。 问题是我无法捕捉快照到UIImage,我得到一个黑屏。 但是,如果我直接添加视图作为子视图,我可以看到快照在那里。 // Snapshot UIView *view = [self.view snapshotViewAfterScreenUpdates:NO]; // Convert to UIImage UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); // Apply the UIImage to a UIImageView BlurView *blurredView = [[BlurView alloc] initWithFrame:CGRectMake(0, […]

如何复制消息在iOS 7中弹跳泡泡

当您在iOS 7中的消息应用程序中进行对话时,如果向上或向下滚动,则会注意到消息发出时的气泡以及更多的文字会弹起。 我试图在我自己的表格视图中复制这个,但是没有find办法去做。 我认为它是使用UIDynamics,但我不知道如何将绑定与滚动和内容弹跳。 任何帮助,将不胜感激

在IOS7中更换UDID

UDID是否有其他select? 我的应用程序不会去App Store,因为我使用企业分布。 那么有没有更换。 我绑绑广告标识符,打开udid,UIID和安全的UDID。 但是,如果手机重置,那么我将得到一个新的UDID。 任何帮助,将不胜感激。

在iOS 7地图上显示路线:addOverlay没有效果

我想在我的mapView中显示一个点到点的路由,我用这个代码来创build路由: – (IBAction)backToYourCar { MKPlacemark *sourcePlacemark = [[MKPlacemark alloc] initWithCoordinate:self.annotationForCar.coordinate addressDictionary:nil]; NSLog(@"coordiante : locationIniziale %f", sourcePlacemark.coordinate.latitude); MKMapItem *carPosition = [[MKMapItem alloc] initWithPlacemark:sourcePlacemark]; MKMapItem *actualPosition = [MKMapItem mapItemForCurrentLocation]; NSLog(@"coordiante : source %f, ActualPosition %f", carPosition.placemark.coordinate.latitude ,actualPosition.placemark.coordinate.latitude); MKDirectionsRequest *request = [[MKDirectionsRequest alloc] init]; request.source = actualPosition; request.destination = carPosition; request.requestsAlternateRoutes = YES; MKDirections *directions = [[MKDirections alloc] […]

在4英寸的屏幕IOS应用程序中的黑色空间

我为IOS7创build了一个适用于视网膜4英寸和3.5英寸的应用程序,当我的目标版本是IOS7时,每件事情都很好。 但是,当我设置6.1以下的版本,然后在顶部和底部栏有一个白色的空间。 当我运行它在IOS6.1模拟器4英寸我得到这样的东西。 我有IOS6.1的Default-568h@2x.png,之前也有。 我正在使用Xcode 5DP 当应用有目标版本7时的屏幕截图 任何帮助将不胜感激