首页 文章 精选 留言 我的

精选列表

搜索[ios],共10000篇文章
优秀的个人博客,低调大师

iOS:在使用Cocoapods安装shareSDK时出现的link路径错误

CocoaPods 错误 target overrides the `OTHER_LDFLAGS`... Xcode 升级到 6.0 后,更新 CocoaPods,出现了如下的警告 [!] The `Paopao [Debug]` target overrides the `PODS_ROOT` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `Paopao [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `Paopao [Release]` target overrides the `PODS_ROOT` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `Paopao [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice. [!] The `KenJiao [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `KenJiao [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. 后果:这种警告是不能忽视的,它带来的直接后果就是无法通过编译。 错误截图: 原因:产生此警告的原因是项目 Target 中的一些设置,CocoaPods 也做了默认的设置,如果两个设置结果不一致,就会造成问题。 解决办法: 1.分别在项目中定义`PODS_ROOT` 和 `Other Linker Flags`的地方,把他们的值用`$(inherited)`替换掉,进入终端,执行pod update ,上面的警告就解决一部分了; 2.在项目中定义的'Framework search paths'的地方,也是把他们的值用`$(inherited)`替换掉,最后编译,通过,ok! $(inherited)作用:自动执行父类的相关代码,执行完后再回来执行系类的代码,也就是继承关系 网上还流行另外一种简单粗暴的方法 点击项目文件 project.xcodeproj,右键`显示包内容`,用文本编辑器打开`project.pbxproj`,删除`OTHER_LDFLAGS`的地方,保存,回到 Xcode,编译通过。 参考链接:http://www.cnblogs.com/ihojin/p/xcode6-cocoapods-error.html 程序猿神奇的手,每时每刻,这双手都在改变着世界的交互方式! 本文转自当天真遇到现实博客园博客,原文链接:http://www.cnblogs.com/XYQ-208910/p/5436515.html ,如需转载请自行联系原作者

优秀的个人博客,低调大师

Unity 5.3 安装完没有Android(安卓)或IOS Module(模块)?

文章目录[点击展开](?)[+] Unity5.3 模块独立 Unity5.3把各个模块分开来了,主程序安装包更轻巧,在官网下载的话,能下载到Unity安装程序,Unity编辑器等一些资源package,其它的模块可以通过Unity安装程序进行下载 下载存档链接:http://unity3d.com/cn/get-unity/download/archive 模块文件 下面是我首次下载的文件 只有web player平台? 安装UnitySetup64-5.3.1f1之后,我发现在安装目录没有Document文档, 打开Unity也会发现只有Web Player平台,其它平台提示模块没有下载,那怎么办呢? 解决方法 1、运行UnityDownloadAssistant(下载助手),此助手可以下载Unity的各个模块,如下图所示,根据需要选择相应的模块 2、设置下载文件的存放,确认Unity的安装目录 ,继续下一步。 下载的模块文件 3、下载成功后,模块会自动安装(日后发给同事他们可以双击安装) 查看已安装模块 4、在Unity的模块管理面板可以看到已安装的模块。 本文转自赵青青博客园博客,原文链接:http://www.cnblogs.com/zhaoqingqing/p/5061732.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

疯狂ios讲义之实例:通过旋转手势旋转图片

实例:通过旋转手势旋转图片 本实例将会对前面的实例进行改进,在前面实例的基础上增加一个旋转手势处理器,从而让该应用既可根据用户捏合手势对图片进行缩放,也可根据用户旋转手势对图片进行旋转。 复制上面的应用,并将该应用改名为RotateImage。该应用的其他部分基本无须修改,只要把控制器类的实现部分稍作修改,为UIImageView控件增加旋转手势处理器,并让程序根据手势旋转的弧度对图片进行旋转即可。下面是修改后的控制器类的实现代码。 程序清单:codes/01/1.3/RotateImage/RotateImage/FKViewController.m @implementation FKViewController UIImage* srcImage; CGFloat currentScale; CGFloat currentRotation; - (void)viewDidLoad { [superviewDidLoad]; [UIApplication sharedApplication].statusBarHidden = YES; srcImage= [UIImage imageNamed:@"seashore.png"]; //设置图片直接显示在中间(不进行任何缩放) self.view.contentMode = UIViewContentModeCenter; //设置imageView初始显示的图片 self.imageView.image = srcImage; //设置初始的缩放比例 currentScale = 1; currentRotation = 0; //设置imageView允许用户交互,支持多点触碰 self.imageView.userInteractionEnabled = YES; self.imageView.multipleTouchEnabled = YES; //创建UIPinchGestureRecognizer手势处理器,该手势处理器激发scaleImage:方法 UIPinchGestureRecognizer* gesture = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(scaleImage:)]; //为imageView添加手势处理器 [self.imageView addGestureRecognizer:gesture]; //创建UIRotationGestureRecognizer手势处理器,该手势处理器激发rotateImage:方法 UIRotationGestureRecognizer* rotateGesture= [[UIRotationGestureRecognizer alloc] initWithTarget:selfaction:@selector(rotateImage:)]; //为imageView添加手势处理器 [self.imageViewaddGestureRecognizer:rotateGesture]; } - (void)scaleImage:(UIPinchGestureRecognizer*)gesture { CGFloatscale = gesture.scale; //根据手势处理器的缩放比例计算缩放后的目标图片大小 CGSizetargetSize = CGSizeMake(srcImage.size.width * scale * currentScale, srcImage.size.height * scale * currentScale); //对图片进行缩放、旋转 self.imageView.image = [[srcImage imageByScalingToSize:targetSize] imageRotatedByRadians:currentRotation]; //如果手势结束 if(gesture.state == UIGestureRecognizerStateEnded) { //计算结束时图片的缩放比例 currentScale = scale * currentScale; } } - (void)rotateImage:(UIRotationGestureRecognizer*)gesture { //获取手势旋转的弧度 CGFloatrotation = gesture.rotation; //根据当前缩放比例计算缩放后的目标图片大小 CGSizetargetSize = CGSizeMake(srcImage.size.width * currentScale, srcImage.size.height * currentScale); //对图片进行缩放、旋转 self.imageView.image = [[srcImage imageByScalingToSize:targetSize] imageRotatedByRadians:currentRotation + rotation]; //如果旋转手势结束 if(gesture.state ==UIGestureRecognizerStateEnded) { currentRotation = currentRotation + rotation; } } @end 上面程序中粗体字代码为UIImageView控件增加了一个UIRotationGestureRecognizer手势处理器,该手势处理器检测到旋转手势后将会激发该控制器的rotateImage:方法,该方法将会根据手势旋转的弧度对图片进行旋转(程序同样使用了UIImage+FKCategory的方法来旋转图片)。 编译、运行该程序,即可看到如图1.5所示的效果。 图1.5使用旋转手势旋转图片 本文转自fkJava李刚51CTO博客,原文链接:http://blog.51cto.com/javaligang/1385944,如需转载请自行联系原作者

优秀的个人博客,低调大师

iOS第三方开源类库 -- 视图切换 HMGLTransitions

HMGLTransitions 是一套动画演示两个UIView 或 UIViewController之间切换时的过渡效果; GitHub下载地址:https://github.com/Split82/HMGLTransitions 有些情况下我们需要两个视图之间做一个动画过渡的切换,或许系统自带的CATransition和普通动画难以满足我们的需求,此时第三方类库就是一个不错的选择;HMGLTransitions提供五种不错效果,分别是: 3D Right(letf) 、Cloth、Flip right(letf)、Rotate和Doors 以上是GitHub上下载自带的Demo展示的五种效果图,展示了两个UIView 和 两个UIViewController各自之间动画切换(截图中仅展示两个view之间切换),工程目录结构: HMGLTransitions目录下是这个第三方类库所有文件,Transitions文件下是五种动画的实现类,你需要那种动画就需要把那种动画头文件包含进去 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { Switch3DTransition *t1 = [[[Switch3DTransition alloc] init] autorelease]; t1.transitionType = Switch3DTransitionLeft; FlipTransition *t2 = [[[FlipTransition alloc] init] autorelease]; t2.transitionType = FlipTransitionRight; transitionsArray = [[NSArray alloc] initWithObjects: [[[Switch3DTransition alloc] init] autorelease], t1,[[[ClothTransition alloc] init] autorelease], [[[FlipTransition alloc] init] autorelease], t2, [[[RotateTransition alloc] init] autorelease], [[[DoorsTransition alloc] init] autorelease], nil]; transitionsNamesArray = [[NSArray alloc] initWithObjects: @"Switch 3D right", @"Switch 3D left", @"Cloth", @"Flip left", @"Flip right", @"Rotate", @"Doors", nil]; self.transition = [transitionsArray objectAtIndex:0]; } return self; } 初始化视图,并把这五种动画效果存放在transitionsArray数组之中,Switch3DTransition默认向右,FlipTransition默认向左,分别定义了一个t1对象和t2对象,设置t1.transitionType = Switch3DTransitionLeft; t2.transitionType = FlipTransitionRight; 所以transitionsArray存放的是7种效果,对应transitionsNamesArray数组中关于动画其中效果的名字,显示在视图上的UITableViewCell上;两个数组是一一对应的关系; 两个UIView之间的动画过渡切换实现方法 //从View1切换到View2 - (void)switchToView2 { UIView *containerView = view1.superview; [[HMGLTransitionManager sharedTransitionManager] setTransition:transition]; [[HMGLTransitionManager sharedTransitionManager] beginTransition:containerView]; // Here you can do whatever you want except changing position, size or transformation of container view, or removing it from view hierarchy. view2.frame = view1.frame; [view1 removeFromSuperview]; [containerView addSubview:view2]; [[HMGLTransitionManager sharedTransitionManager] commitTransition]; } //从View2切换到View1 - (void)switchToView1 { UIView *containerView = view2.superview; // Set transition [[HMGLTransitionManager sharedTransitionManager] setTransition:transition]; [[HMGLTransitionManager sharedTransitionManager] beginTransition:containerView]; // Here you can do whatever you want except changing position, size or transformation of container view, or removing it from view hierarchy. view1.frame = view2.frame; [view2 removeFromSuperview]; [containerView addSubview:view1]; // Commit transition [[HMGLTransitionManager sharedTransitionManager] commitTransition]; } #pragma mark - #pragma mark ModalController delegate - (void)modalControllerDidFinish:(ModalViewController *)modalController { [[HMGLTransitionManager sharedTransitionManager] setTransition:transition]; [[HMGLTransitionManager sharedTransitionManager] dismissModalViewController:modalController]; } ModalviewController类中定义一个ModalControllerDelegate协议,定义协议方法- (void)modalControllerDidFinish:(ModalViewController*)modalController;实现两个View之间的传值,也就是当我们在UITableViewCell对象上现则哪中过渡效果是的时候,传递HMGLTransition对象transition; [HMGLTransitionManager sharedTransitionManager]使用了单例设计模式 实现两个UIViewController之间的动画切换方法 - (IBAction)viewTransitionButtonPressed:(id)sender { UIButton *button = (UIButton*)sender; // view transition to view1 or view2 depending on actual view if (button.superview == view1) { [self switchToView2]; } else { [self switchToView1]; } } - (IBAction)modalPresentationButtonPressed:(id)sender { [[HMGLTransitionManager sharedTransitionManager] setTransition:transition]; ModalViewController *newController; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { newController = [[ModalViewController alloc] initWithNibName:@"ModalViewController-iPad" bundle:nil]; } else { newController = [[ModalViewController alloc] initWithNibName:@"ModalViewController" bundle:nil]; } newController.delegate = self; [[HMGLTransitionManager sharedTransitionManager] presentModalViewController:newController onViewController:self]; [newController release]; } 演示一个Demo: 1.新建一个Single View Application模板工程,命名RollingView,将下载下来的工程中里HMGLTransitions文件夹拷贝加入到你的工程目录中,然后添加QuartzCore.framework 和OpenGLES.framework 库 2. File->New->File 添加一个控制器类ViewController2,在ViewController.h中包含头文件 // ViewController.h #import <UIKit/UIKit.h> #import "Switch3DTransition.h" #import "FlipTransition.h" #import "RotateTransition.h" #import "ClothTransition.h" #import "DoorsTransition.h" #import "ViewController2.h" #import "HMGLTransitionManager.h" @interface ViewController : UIViewController { UIButton *startBtn; HMGLTransition *transition; } @end 在ViewController.m中 自定义Button // custom Button - (UIButton *)buttonWithFrame:(CGRect)frame withNormalTitle:(NSString *)title withOtherStateTitle:(NSString *)otherTitle action:(SEL)action { UIImage *buttonBackgroundImage = [[UIImage imageNamed:@"button_background.png"] stretchableImageWithLeftCapWidth:5 topCapHeight:5]; UIImage *disabledButtonBackgroundImage = [[UIImage imageNamed:@"button_background_disabled.png"] stretchableImageWithLeftCapWidth:5 topCapHeight:5]; UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = frame; [button setTitle:title forState:UIControlStateNormal]; [button setTitle:otherTitle forState:UIControlStateDisabled]; [button setBackgroundImage:buttonBackgroundImage forState:UIControlStateNormal]; [button setBackgroundImage:disabledButtonBackgroundImage forState:UIControlStateDisabled]; [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [button setTitleColor:[UIColor grayColor] forState:UIControlStateDisabled]; [button addTarget:self action:action forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:button]; return button; } - (void)viewDidLoad { [super viewDidLoad]; CGRect butRect = CGRectMake(self.view.bounds.origin.x + 60, self.view.bounds.origin.y + 100, self.view.frame.size.width-60-60, 100); startBtn= [self buttonWithFrame:butRect withNormalTitle:@"View 1" withOtherStateTitle:@"View 1" action:@selector(startView:)]; Switch3DTransition *tran = [[[Switch3DTransition alloc] init] autorelease]; tran.transitionType = Switch3DTransitionLeft; transitionArr = [[NSArray alloc] initWithObjects:[[[DoorsTransition alloc] init] autorelease], nil]; self.transition = [transitionArr objectAtIndex:0]; [HMGLTransitionManager sharedTransitionManager]; } 点击Button实现两个UIViewController之间的动画切换 -(void)startView:(id)sender { [[HMGLTransitionManager sharedTransitionManager] setTransition:transition]; ViewController2 *vc2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:nil]; [[HMGLTransitionManager sharedTransitionManager] presentModalViewController:vc2 onViewController:self]; } 在ViewController2类中,方法实现基本类似 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { FlipTransition *tran = [[[FlipTransition alloc] init] autorelease]; tran.transitionType = FlipTransitionLeft; transitionArr = [[NSArray alloc] initWithObjects:[[[FlipTransition alloc] init] autorelease], nil]; self.transition = [transitionArr objectAtIndex:0]; } return self; } - (void)viewDidLoad { [super viewDidLoad]; CGRect butRect; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { butRect = CGRectMake(self.view.bounds.origin.x + 60, self.view.bounds.origin.y + 100, 768-60-60, 100); } else { butRect = CGRectMake(self.view.bounds.origin.x + 60, self.view.bounds.origin.y + 100, self.view.frame.size.width-60-60, 100); } endBtn= [self buttonWithFrame:butRect withNormalTitle:@"View 2" withOtherStateTitle:@"View 2" action:@selector(endView:)]; } -(void)endView:(id)sender { [[HMGLTransitionManager sharedTransitionManager] setTransition:transition]; ViewController *vc1; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { vc1 = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil]; } else { vc1 = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil]; } [[HMGLTransitionManager sharedTransitionManager] presentModalViewController:vc1 onViewController:self]; } 源码:http://download.csdn.net/detail/duxinfeng2010/5212826 欢迎转载分享,请注明出处http://blog.csdn.net/duxinfeng2010 本文转自新风作浪 51CTO博客,原文链接:http://blog.51cto.com/duxinfeng/1208673,如需转载请自行联系原作者

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码