w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
i want to setup cocos3d with uikit (nib or storyboard) but i am getting error
Yes i have got it working,just call it from your view controller as CCTexture2D.defaultAlphaPixelFormat = kCCTexture2DPixelFormat_RGBA8888; // ** START OF COCOS3D SETUP CODE... ** // Create the customized CC3Layer that supports 3D rendering. if( ! [CCDirector setDirectorType: kCCDirectorTypeDisplayLink] ) [CCDirector setDirectorType: kCCDirectorTypeDefault]; // Create the view controller for the 3D view. _viewController = [CC3DeviceCameraOverlayUIViewController new]; _viewController.supportedInterfaceOrientations = UIInterfaceOrientationMaskAll; _viewController.viewShouldUseStencilBuffer = NO; // Set to YES if using shadow volumes _viewController.viewPixelSamples = 1; // Set to 4 for antialiasing multisampling // Create the CCDirector, set

Categories : Iphone

calabash-ios setup clang: error: no such file or directory 'UIKit'
We had the same error using calabash and frank. To fix this it was a bit hit and miss but we found that running the cordova build again to create the whole ios app fresh eg. no frank or calabash stuff in there, then putting only calabash into it worked and was able to compile and run tests. How ever you may later run into issues with CDVViewController.h not being found or you could find that it works but if your trying to automate your tests through an ant script etc. then it will complain about not running the cucumber command in the correct place where cordova compiled your .app file so beware of this. You may need to do some clever file copying and edit your APP_BUNDLE_PATH when you get to this point. Hope that helps...

Categories : IOS

iOS Addressbook: Cannot setup an ABNewPersonViewController in storyboard
Try doing this, in the connection inspector of the TabBarController in the storyboard, there is a head 'Triggered Segues', make a connection from 'view controllers' to the 'ABNewPersonViewController'. Run your app, it will work. If you need to further navigate, say from ABNewPersonViewController to ChildOfABNewPersonViewController, then you need to connect ABNewPersonViewController to the NavigationController and NavigationController's rootviewcontroller to ChildOfABNewPersonViewController. Cheers !!

Categories : IOS

Best Storyboard-Practice for App w/ Initial Setup Screen
go with option B, you just need to make sure in your app delegate to perform a check on which controller to show. You can set in your Settings.plist a BOOL variable that show if the setup has already done or not. fetch that result from your settings plist and use it to call one or another view controller. ( if the BOOL hasSetup is TRUE ( you already have setted all up ) you won't even create the instance of the setup controller ).

Categories : IOS

MMDrawerController navigating centerviewcontroller from sideviewcontrollers with Storyboard setup
Figured it out: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UINavigationController *nav = (UINavigationController *)self.mm_drawerController.centerViewController; [nav popToRootViewControllerAnimated:NO]; [self.mm_drawerController closeDrawerAnimated:YES completion:nil]; }

Categories : IOS

How to Add a New StoryBoard, and set it to become the Main StoryBoard xCode without error
Take storyboard file from New file-->ios-->user interface---> storyboard create @property storyboard in appdelegate like @property (nonatomic, retain) UIStoryboard* storyboard ; before implementation in .m file write: @interface AppDelegate () @property (strong, nonatomic) UIViewController *initialViewController; @end This is to take refrence of initial viewcontroller. then @synthesize storyboard in appdelegate.m and then for navigation you can write in didFinishLaunchingWithOptions //init storyboard storyboard = nil; if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")) { CGSize result = [[UIScreen mainScreen] bounds].size; if(result.height == 480) { storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhoneIOS5" bundle:nil]; NSL

Categories : IOS

CC3MeshNode is not affected by light in cocos3d
I think the problem is you need to supply vertex normals for your mesh. Normals are required for the lighting calculations to operate correctly. The routines to automatically populate a sphere, etc. are generating and storing vertex normals in the mesh. Desktop OpenGL will generate normals for a mesh without them when you use glEnable(GL_AUTO_NORMAL), but this functionality doesn't exist in mobile, at least not in OpenGL ES 2.0.

Categories : IOS

Can't draw line using CC3LineNode in cocos3d
did you import? #import "CC3ParametricMeshNodes.h" you error gives you unfound instance of method, so you just need to make right import with that method found answer here proof screenshot

Categories : IOS

Stop in front of obstacles in Cocos3d
If you are still interested in finding an answer to this problem. I may be able to provide you with an alternative solution. I am about to release free source for a 3d collision engine I ported to cocos3d, and it will give you more flexibility than simply stoping an object in front of another. I am currently polishing out the code a little for easy use, but if you are interested you can email me to: waywardson07@aol.com you could also get a little preview of the engine in action here: http://www.youtube.com/watch?v=QpYZlF7EktU Note: the video is a little dated.

Categories : IOS

Setting Storyboard.Targetname on a storyboard defined as a static resource
I think you're going to need to do this with a custom attached property. You would clone the Storyboard, and set the TargetName on the clone, and return it. Your class would look like this: public static class NamedStoryboard { public static readonly DependencyProperty StoryboardProperty = DependencyProperty.RegisterAttached( "Storyboard", typeof(Storyboard), typeof(NamedStoryboard), new FrameworkPropertyMetadata(DoAttach)); [AttachedPropertyBrowsableForType(typeof(BeginStoryboard))] public static Storyboard GetStoryboard(BeginStoryboard obj) { return (Storyboard)obj.GetValue(StoryboardProperty); } public static void SetStoryboard(BeginStoryboard obj, Storyboard value) { obj.SetValue(StoryboardProperty, value); }

Categories : C#

Error when i use storyboard in windows phone 8?
To accomplish this task I suggest to use a Canvas as LayoutRoot and a GestureListner from Windows Phone Toolkit to catch user gestures. Your XAML should looks like this <Canvas x:Name="LayoutRoot" Background="Transparent"> <toolkit:GestureService.GestureListener> <toolkit:GestureListener x:Name="SurfaceGestureListner" Tap="SurfaceGestureListner_OnTap" DragDelta="GestureListnerDragDelta"/> </toolkit:GestureService.GestureListener> <Image x:Name="MyImage" Source="/Assets/ApplicationIcon.png" Height="100" Width="100"> <Image.RenderTransform> <TranslateTransform x:Name="TranslateTransform"/>

Categories : C#

Could not load NIB in bundle error in storyboard
There can be many reasons for this particular problem, but first check Target membership and XIB name, as advised here: Could not load NIB in bundle Check also very carefully if there is any kind of control who's name has changed in header files, but the referencing outlet stayed the same.

Categories : IOS

Error using StaticResource as Storyboard for a VisualTransition
enter code hereTo anyone else who runs into this issue, I have found a solution. Simply changing the Storyboard to not be shared allows it to be created for each animation call, which gets rid of this error. Set x:Shared to False on the Storyboard to do this: <Storyboard x:Shared="False" x:Key="Storyboard_Locked_ToUnlocked">

Categories : Wpf

Thread 1 : SIGABRT error in simple storyboard app
Your nib file is incorrectly constructed, most likely. It would appear that you have something other than a table view connected to the table view controller's outlet that should point to the table view.

Categories : IOS

com.apple.InterfaceBuilder error -1. Storyboard Can Not Be Opened
I would hazard a guess that the location that the project file is using is likely not the same as the one you copied over. This can happen easily if you pull in a file from outside your project directories. A quick manual reconnection can be done like so: Find the file in the Project Navigator. Right-click it (or the equivalent) and select Delete. In the pop-up that appears, select Remove Reference. Still in Project Navigator, right-click on the folder that that file was formerly listed under and choose Add Files To "Your Project Name". Track down the location of the file and Add it. It should appear in the Project Navigator again.

Categories : IOS

Cannot open storyboard (com.apple.InterfaceBuilder error -1.)
This problem is being caused by merging each others storyboard changes. The storyboard format is XML based. When you make changes, these changes are being saved in the project file. Xcode seems to be non-deterministic in the way it saves the structure of this file, things can be sorted differently, objects can appear in different places in the structure. This doesn't matter when you are working on your own, but when two or more people make a change to the storyboard, merges can get very ugly. Even though git seems to be able to merge the files fine, the structure of the file gets corrupted and you won't be able to open your storyboards. Commit your changes to storyboards early and push. Allways pull before making changes to the storyboard. Don't merge, pick one version and continue. You

Categories : Xcode

JASlidingpanels storyboard example root view controller error
I think your problem lie in the method. You are calling awakeFromNib but are using storyboards. Try putting your code in like this: #import "RootViewController.h" @interface RootViewController () @end @implementation RootViewController -(void)viewDidLoad { [self setLeftPanel:[self.storyboard instantiateViewControllerWithIdentifier:@"leftViewController"]]; [self setCenterPanel:[self.storyboard instantiateViewControllerWithIdentifier:@"centerViewController"]]; [self setRightPanel:nil]; [self.sidePanelController showCenterPanelAnimated:YES]; [super viewDidLoad]; } @end Notice that I am using viewDidLoad and not awakeFromNib because awakeFromNib is called when the controller itself is unarchived from a nib. viewDidLoad is called when the view is created/unarchi

Categories : IOS

UIKit with 3D Viewer iOS
Unfortunately, there is not an easy way to do this on iOS. Your best bet is likely to be looking into GLKit, but that still means either writing a lot of your own code to read and display the model, or finding third party code somewhere. On Mac OS X, there is Scene Kit, but I have heard no mention of it coming to iOS.

Categories : IOS

Getting error while inserting data to my table in database using 'storyboard' i.e "no visible interface..."?
Your syntax to set a property is wrong, it should be products.nameProd = self.txtNameFeild.text; which the compiler translates to the equivalent [products setNameProd:self.txtNameFeild.text]; And arrayOFProducts should be declared as NSMutableArray if you want to add objects to it. (Note that you can remove the @synthesize statements from your source code, the current Clang compiler synthesizes properties automatically.)

Categories : IOS

iOS/UIKit: Keep size during rotation
I think JeffCompton is right: there is no way for you to change the size of your view given the orientation using just the XIB / Autolayouts / Autoresizing masks. I think the simplest way to do that is: - (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [UIView animateWithDuration:0.3 animations:^(void) { if(UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) { self.yourView.frame = CGRectMake([UIScreen mainScreen].frame.size.width-320/2,[UIScreen mainScreen].frame.size.height-240/2,320,240); } else { self.yourView.frame = CGRectMake([UIScreen mainScreen].frame.size.width-240/2,[UIScreen mainScreen].frame.size.height-320/2,240,320); } }]; }

Categories : IOS

UIKit additive blending
iOS 7 introduced a new class of Layer called the CABackdropLayer. A Backdrop Layer gets its image from the UIView below it in the hierarchy. This is the layer type Apple uses for its Burn and Overlay effects in the Control Center, Notification Center, Passcode, Dial Pad, etc. as well as the frost/gaussian blur views. To use this type of layer, subclass UIView like so.... @interface MyBackdropView : UIView @end @implementation MyBackdropView + (Class)layerClass { return [CABackdropLayer class]; } There are some private API methods to add this capability to existing UIViews too, but they wouldn't be safe for the App Store.... UIView *blendedView = [[UIView alloc] initWithFrame:frame]; [blendedView _setDrawsAsBackdropLayerWithBlendMode:kCGBlendModeColorBurn];

Categories : IOS

Getting memory leak in UIKit?
One easy way to detect where your leaks come from is to use the Extended Detail view of the Instruments. To do that click on "View"->"Extended detail" and a right menu with the stack trace of the "leak" will appear. There you will easily find the leaking code for each leak and if they come from your app.

Categories : IOS

Storyboard error unarchiving document objects - *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Try doing git status in terminal to make sure you have a clean copy of the file, not one with local modifications and/or merge conflicts. Open the file with a text editor and see if it looks the same as on other machines. Have you looked at the console tab in XCode to see what it says the problem is?

Categories : GIT

Export blender 3d model with texture to iPhone using Cocos3D - Texture not showing
Okay, I got it working. I will explain in detail. For starters, my mistake was I hadn't added the texture image to the XCode project bundle. I was having a misconception that once the texture is added in blender, it automatically gets exported along with the .pod file. But it is not the case. When you export textured models from Blender, don't forget to add the texture to the XCode project bundle. One other things I noticed when trying to fix this error, which also results in your texture not getting showed when running in iPhone. When you export .blend to .pod in two steps (.blend -> .dae -> .pod), there are some configuration you need to do before the first conversion (.blend -> .dae). That is when you save the .dae file, you need to tick all fields under "Texture Options". Then onl

Categories : IOS

UIKit restoration not calling viewControllerWithRestoreIdentifierPath on all VC
Solution The app cannot restore if the restorationidentifier is not set. Altough I have set them in my custom initialisers it didn't seem to work. The solution was to set the restoration identifier on the next vc, before it was pushed. I will have to dive into this and see if there's a better solution.

Categories : IOS

Does apportable work with UIKit classes?
It is not supported in the Starter (free) version (other than some rudimentary classes). It is supported in the Indie version and above, but it seems it is beta. See: http://www.apportable.com/pricing, where holding the mouse over "Advanded Frameworks" says it supports UIKit.

Categories : Misc

"rhc setup" throws the following error
Might be a highline bug introduced recently (https://github.com/JEG2/highline/issues/83) - try uninstalling highline 1.6.19 and trying 1.6.18 or 17 - gem uninstall highline --version 1.6.19 gem install highline --version 1.6.18

Categories : Ruby

Installing python-flask gives Error [python setup.py egg_info failed with error code 1]
You can always got to pypi and download packages manually. https://pypi.python.org/pypi/Flask And then put the flask folder into the C:Python33libsite-packages. The problem you have is that the installer is not made for python3. This makes me think that they did not prepare flask for python 3 which makes me guess that if you install flask under Python 3 you will have more problems. But you can try and be lucky.

Categories : Python

not able to add appdelegate in object /// cocos 2d uikit integration
Use AppController instead of Appdelegate. That tutorial is referring old cocos2d version. In Cocos2d 2.0 onwards used AppController in place of Appdelegate. Again don't know why Cocos2d team doing this kind of simple naming changes !!!

Categories : IOS

Why must UIKit operations be performed on the main thread?
In Cocoa Touch, the UIApplication i.e. the instance of your application is attached to the main thread because this thread is created by UIApplicatioMain(), the entry point function of Cocoa Touch. It sets up main event loop, including the application’s run loop, and begins processing events. Application's main event loop receives all the UI events i.e. touch, gestures etc. From docs UIApplicationMain(), This function instantiates the application object from the principal class and instantiates the delegate (if any) from the given class and sets the delegate for the application. It also sets up the main event loop, including the application’s run loop, and begins processing events. If the application’s Info.plist file specifies a main nib file to be loaded, by including the NSMa

Categories : Iphone

Is the creation of an UIKit object in background using GCD a bad practice?
Yes, this is risky. How risky it is only Apple developers can say. If the documentation says "don't use it", just don't use it. Note that many UI objects can (and do) use shared resources. If you use them in a background thread, you'll get a race condition on the shared resource and anything can happen.

Categories : IOS

UIKit additions: bridging the gap between eg CGRectValue and NSStringFromCGRect?
You can't; see "Call a function named in a string variable in C". Yup, you have to know the return type at compile time. All is not lost, however: what you're trying to do can actually be accomplished in a fairly mundane way. NSValue has the very nice feature that its description method gives output very similar to the appropriate NSStringFrom...() function for the type it's storing (it's probably using them under the hood). For example: NSLog(@"%@", [NSValue valueWithCGAffineTransform:CGAffineTransformMake(10, 10, 10, 10, 10, 10)]); NSLog(@"%@", [NSValue valueWithCGSize:CGSizeMake(10, 10)]); yields: 2013-08-11 03:06:43.053 PrintingNSValue[51538:11303] CGAffineTransform: {{10, 10, 10, 10}, {10, 10}} 2013-08-11 03:06:43.055 PrintingNSValue[51538:11303] NSSize: {10, 10} NSNumbe

Categories : Objective C

How do I mark a UIKit class or method as deprecated?
#pragma GCC poison interactionControllerWithURL Note the lack of a colon. Poison is designed to work with C symbols, not Objective-C selectors. However, it will do what you need here. (The pragma was introduced in GCC but clang supports it too, BTW).

Categories : IOS

Custom error message using WiX setup
You can do this using properties. Use the Bitmap control to set the icon. <Binary Id="RightClick" SourceFile="ResourcesRight.jpg" /> <Binary Id="WrongClick" SourceFile="ResourcesWrong.jpg" /> Use SetProperty or CustomAction to set the property value based on a condition and pass the value to the Bitmap control. <PropertyRef Id="NETFRAMEWORK40FULL" /> <Property Id="NETFramework_Icon" Value="WrongClick" /> <SetProperty Id="NETFramework_Icon" Value="RightClick" After="AppSearch">NETFRAMEWORK40FULL</SetProperty> In dialog, <Control Type="Bitmap" Id="NETFramewor40ico" Width="20" Height="20" X="240" Y="70" Text="[NETFramework_Icon]" /> Regarding the second query, disable the next button if any prerequisites are not installed or throw a cu

Categories : Wix

Moq rethrow error passed into Setup
If you want it to only fail then use Throws method like: moqIEventLogger .Setup(s => s.WriteError(It.IsAny<Exception>(),It.IsAny<string>())) .Throws<InvalidOperationException>(); If you want it to throw given as argument exception try: moqIEventLogger .Setup(s => s.WriteError(It.IsAny<Exception>(),It.IsAny<string>())) .Callback((Exception ex, string s) => { throw ex; });

Categories : C#

django-likes: setup and error
Looks like you are running django-likes on Django 1.5 in which usage of takes_context parameter of inclusion_tag has changed Note that when you’re using takes_context=True, there’s no need to pass arguments to the template tag. It automatically gets access to the context. And likes template tag code is @register.inclusion_tag('likes/inclusion_tags/likes_extender.html', takes_context=True) def likes(context, obj, template=None): if template is None: template = 'likes/inclusion_tags/likes.html' request = context['request'] import_js = False if not hasattr(request, '_django_likes_js_imported'): setattr(request, '_django_likes_js_imported', 1) import_js = True context.update({ 'template': template, 'content_obj': obj,

Categories : Django

Titanium setup runtime error
i solved the problem by manually download and install the JDK and add this variables below to the system environment variables : android_sdk – The path to the Android SDK, similar (if not the same) to C:Program FilesAndroidandroid-sdk-windows JAVA_HOME – The path to the JDK, similar (if not the same) to C:Program FilesJavajdk1.7.0_22

Categories : Android

iOS storyboard based application crashed on device with error exited abnormally with signal 11: Segmentation fault: 11
Segmentation fault occur when you try to access reference of memory which doesn't exist anymore, In case of iOS your code is accessing a object or variable which released after you used and then you are again using it but that has been released by reference counter. Try to check reference in your code. First set properties to strong reference type which are being used throughout the app. Memory alloc and dealloc can be tracked by running application with Instruments in Xcode. Also you can use breakpoints in flow of application so that you can know in your code exactly from where this app is crashing and which objects or variables were being used that time.

Categories : Iphone

How to add option that User to select a location to install in .Net Setup Project while installing setup?
Case of Winforms deplyment: Right click on the deployment project in the Solution window and select View, File System. Click on the Application Folder. Notice in the Properties window, change the Default location to whatever you want Case of Web: You can implement this by overriding the “Install” method, check this for an example Allow user to set physical directory path during Web Project deployment

Categories : Asp Net

Is it possible to draw text with shadows using the NSString UIKit additions?
The following snippet uses CALayer to add shadow around the edges of the characters in a UILabel: _helloLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 30)]; [_helloLabel setBackgroundColor:[UIColor clearColor]]; [_helloLabel setTextColor:[UIColor whiteColor]]; [_helloLabel setTextAlignment:NSTextAlignmentCenter]; [_helloLabel setFont:[UIFont lightApplicationFontOfSize:30]]; _helloLabel.layer.shadowColor = UIColorFromRGB(0xd04942).CGColor; _helloLabel.layer.shadowOffset = CGSizeMake(0, 0); _helloLabel.layer.shadowRadius = 2.0; _helloLabel.layer.shadowOpacity = 1.0; [self addSubview:_helloLabel]; . . normally this would add a shadow around the border, but UILabel seems to treat these properties as a special case.

Categories : IOS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.