w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Xcode: Storyboard and simulator image are different colors
On simulator menu bar from tab Debug uncheck all options and you can reset the content and settings of simulator. May it can change the color schema of simulator.

Categories : Iphone

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

Xcode 4.x.x giving error in storyboard after updating it from Xcode 5
Now I have solved it, below are the steps to follow: Step I Right click on your StoryBoard and openAs "SourceCode" Step II Step III Now you are done. open storyboard as interfaceBuilder

Categories : Iphone

Xcode 4 won't allow me to open the storyboard edited in Xcode 5
Go back to your Storyboard in Xcode 5, then go to the right pane under the File Inspector tab (select it from the top, it's the icon with the little blank sheet). You will find a section called Interface Builder Document. There, set Opens in as Xcode 4.6 instead of Default (5.0). It will also change the way your user interface will look like, since Xcode 4.X doesn't support iOS 7 SDK, which contains the User Interface components (known as flat UI). Though, you can use Xcode 5 to develop for iOS 6 (I do). EDIT As Idan said, you won't be able to submit apps for the App Store from a beta version of Xcode, so until its official 'stable' release comes out

Categories : IOS

Can't run app in simulator :: XCODE 5
As Michael D suggested, I got an instant answer from Dev forum. Here is the answer: Delete the app from simulator or reset the simulator. Later I got Similar issue in iPhone too. Deleting the app from iPhone will solve that issue also. This works.

Categories : IOS

XCode: App Won't Run on Simulator
Recently,i find out that if you have modified you /etc/hosts files and change 127.0.0.1 to another domain rather than localhost,XCode will fail to attatch the process on your simulator. Restore you /etc/hosts file may fix your problem.

Categories : IOS

Xcode 5 without Storyboard and ARC
Create a project with an Empty application and Add any viewcontroller (i added TestViewController here) - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. TestViewController *test = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:test]; self.window.rootViewController = nav; [self.window makeKeyAndVisible]; return YES; } STEPS FOR REMOVE ARC 1) In build setting set Automatic Reference Counting to NO. //////////////////////////////////////

Categories : IOS

iOS Simulator for Xcode 4.5 not copying Resources over
Go to build phases under your target and go to "copy Bundle Resources" and click the plus button and add the file, clean your build, delete the app, and run it in xcode and the file should be there.

Categories : IOS

iOS - Can't Build on Device but Simulator on Xcode 4.6
How are you trying to link your library in? A "-lxml2" line in your build settings? When I add my dylibs to my project, I usually do it the way you see in my screenshot. Try this and see if it works for you also:

Categories : IOS

Searching Xcode Storyboard
Using the Search Navigator within Xcode would not have found that unrecognized selector, since as you stated you had changed the name of that selector already, and the Search Navigator won't search the contents of your storyboards. Right-click the storyboard file in Xcode and choose Open As > Source Code. (Edit: originally I instructed to open the storyboard file in an external text editor, but that's not necessary). Use Cmd-F to search the XML for the old selector name. You will be looking for an XML element named action with a selector attribute equal to the unrecognized selector. Once you find that, inspect the parent XML elements to get an idea of where this connection is in your storyboard.

Categories : Xcode

Is there a method which runs when the simulator is closed from XCode?
I think this Apple Q&A will be interesting: Detecting the Debugger I found it mid-way through this article: Apple provided a little function to determine whether the debugger is attached here. So as soon as my application starts in the Simulator, I'll let it wait: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { #if DEBUG // Wait max. 10 secs for debugger to attach again: double waitTime = 0.0; while (AmIBeingDebugged() == NO && waitTime < 15.0) { [NSThread sleepForTimeInterval:0.25]; waitTime += 0.25; } #endif

Categories : Objective C

Rotation of element in file on simulator in Xcode
You can fix it using - (NSUInteger)supportedInterfaceOrientations //ios 6 { return UIInterfaceOrientationMaskLandscape; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation //ios 5 { if (UIInterfaceOrientationIsLandscape( interfaceOrientation)) { return YES; } return NO; }

Categories : Iphone

simulator not showing after successfull build in xcode 4.6.1
ok does the simulator appear.if yes please select IOS simulator in toolbar and then 'Reset Content and Settings'.I suppose this should work and if there is the case that simulator is itself not appearing then please quit xcode and work. I suppose it will work.

Categories : IOS

Xcode - How to switch view in storyboard
You can't just use a UIImage. You need to use a UIButton and then under the properties set the button to custom and set background image to the image you want. Then you can click and drag from the button to the new view and choose modal. I'm having you choose modal because from what I can gather, you aren't using a navigation controller. Therefore you'd modally want to present the view controller.

Categories : IOS

How to link to another view of storyboard Xcode
There are a couple of ways to do this. The first is to create a segue that directly links the login button to the new view controller. If you want to do this, right click drag (or control drag) from the button to the new view controller. This should make a grey line going from the first controller to the second one. You can then click on the little circle in the middle of the segue in interface builder to give it a name and specify the type. Alternatively, if you created the login button with code, or would just like more control over your segues, you can create a generic segue in interface builder, meaning just control drag from one view controller to the other. If you do it this way, YOU MUST NAME THE SEGUE so you have a way to invoke it later. Then you just call [self performSegueWith

Categories : IOS

Use storyboard from dependent project in XCode
Debug the app by looking into the app generated by XCode. Check if the storyboard or bundle is present. (Thank you Micheal) The bundle generated by MyLib was not present Build the bundle using the target MyLibResources Drag and drop the bundle in XCode in the main project.

Categories : IOS

XCode 5 Storyboard Internal Inconsistencies
same bug here. you should file a bug report (https://developer.apple.com/bug-reporting/). For me it's seem like it's the message is also incorrect. If I check the diff before and after this error I have this: - <rect key="frame" x="0.0" y="0.0" width="320" height="310"/> + <rect key="frame" x="0.0" y="0.0" width="319.99999999999994" height="310"/>

Categories : Iphone

Can you install an Android Device Simulator in xcode when using Apportable
Note that it is generally much easier to work with an Android device than the emulator, but it is possible to use the emulator: ~/.apportable/SDK/toolchain/macosx/android-sdk/tools/android will launch the android tool which can create AVD's. Make sure to install the ARM EABI v7a System Image, then create an AVD with a Target of API level 17, CPU/ABI of ARM (armeabi-v7a), the SD card size of around 500 MiB, I usually choose a builtin skin of WVGA800, select the Hardware features of Abstracted LCD density of 240, Max VM application heap of 48 and Device ram size of at least 512, internal storage should be at least 500 MiB. And most of all make sure to check the box for Use Host GPU. to run the emulator: DYLD_LIBRARY_PATH=~/.apportable/SDK/toolchain/macosx/android-sdk/tools/lib/ ~/.appor

Categories : Android

Run iOS 6.1 Simulator from Xcode and after launch images get a black screen
First of all check whether you have added any view controller in Tab controller. Next see if you have mentioned your ViewController class properly in the storyboard properties. Let me know if my answer is not clear

Categories : IOS

xcode storyboard button object interfacing
In the .h file... @interface questionViewController : UIViewController <UITextFieldDelegate> { //You need to connect your textfield in the storyboard to the .h file. Select outlet and name it what you what NSString *textFieldData __weak IBOutlet UITextField *yourTextField; } in the .m file - (void)viewDidLoad { textFieldData = yourTextField.text; } I am not sure what you mean by make your button call an event. If you want to execute a method, connect the button on the storyboard to the .h file, select IBAction, name the action. The method will automatically appear in the .m

Categories : Xcode

Viewing Custom Text in Xcode Storyboard
You can't do it in Xcode 4, as it limits you to the preloaded fonts. Xcode 3 had the opposite problem (with .xib files anyway) of allowing you to use any font on your Mac, even if it would not be available to your app at runtime. Hopefully a future version of Xcode will hit the useful middle ground of giving you exactly what it can determine will be available at runtime. This is actually difficult for Apple to do because the storyboards/nibs live in a project (which may have multiple targets) and the fonts exist in the targets. IMO they should let you use any font and add a build-time warning if a storyboard/nib is built into a target that does not have all the required fonts in it. What may work is to edit the storyboard as text (available by right-clicking) and rewrite the font names i

Categories : Iphone

Does storyboard alter code functionality in xcode?
From Apple's UIViewController class reference: If your app uses a storyboard to define a view controller and its associated views, your app never initializes objects of that class directly. Instead, view controllers are either instantiated by the storyboard—either automatically by iOS when a segue is triggered or programmatically when your app calls the storyboard object’s instantiateViewControllerWithIdentifier: method. When instantiating a view controller from a storyboard, iOS initializes the new view controller by calling its initWithCoder: method instead. iOS automatically sets the nibName property to a nib file stored inside the storyboard.

Categories : Xcode

Too many views in storyboard - Xcode running Slow
I faced the same issue when I was working on an Enterprise App. In the Project I had only one storyboard and all views in a single storyboard. Opening the storyboard caused Xcode to get very slow. So I divided the storyboard into multiple storyboards as module-wise and load a separate storyboard per module like in the code below: If I want to push a view controller: UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"storyboardName" bundle:nil]; UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"Members_ViewController"]; [self.navigationController pushViewController:viewController animated:YES];

Categories : IOS

How do I change background color of storyboard in xcode 4.6.2
You are most probably clicking on the view controller which is showing those properties that can be adjusted in the view controller itself. This can be found out on the left of the storyboard or Interface Builder. A view is not the same as view controller. A view controller manages a set of views, as mentioned in the View Controller Programming Guide for iOS. Try to click on the view of the view controller and you should be able to modify the background color of the view:

Categories : Xcode

Manually specify constraints in Xcode 4 interfacebuilder/storyboard
The problem when working with constraints in IB/storyboard is that Xcode will never allow you to have ambiguous constraints. Ever. Including when you are in the process if editing them. So whenever you may want to edit multiple constraints, Xcode may decide to automatically add some to prevent a disallowed state. This can be painful to work with. What I have found kind of works is adding bogus constraints on all four edges while I am setting other constraints. This - hopefully - keeps IB in check and prevents it from adding completely dumb stuff. You can add constraints from the top menu. Click the object and then Editor from the to menu. You can add constraints with the Align and Pin submenus (which then can be edited later on). Note: not all constraints can be added in IB. Aspect rati

Categories : IOS

How do I force the Xcode compiler to ignore a library when building for the iOS simulator
In XCode, you can configure a separate library list for each iOS/simulator sdk. Here are the step to configure this: Click on your peoject->Target->Build Settings->Linking->Other Linker Flags Click "+" for your build configuration (e.g. Debug) under Other Linker Flags. For the new entry under your build configuration select "Any iOS Simulator SDK" and remove the library that you don't want to link. You can add as many entries as you want by clicking the "+" button on the build configuration and configure the libraries that you want for any particular sdk. Same technique can be applied for other settings in XCode for a target.

Categories : Xcode

Xcode project crash in iPhone Simulator without reaching didFinishLaunchingWithOptions
There's a new bug with OSX 10.8.4 and Xcode. It'll crash due to thread race conditions on trying to kill the previous app running. If you don't update to 10.8.4 it's not an issue. It's annoying, and you'll have to wait ~5 seconds after stopping the current app before re-running. https://devforums.apple.com/message/823939#823939

Categories : Xcode

Can no longer drag/drop onto Storyboard after installing Xcode 5
If you remember back to the first time you opened your Xcode 4 storyboard in Xcode 5, you were prompted with the following message. The content of the above screenshot should answer your question.

Categories : IOS

Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators
Looks like this is a known issue. From the Xcode 5 release notes: After switching the minimum deployment target of an application from iOS 7.0 to a release prior to iOS 7.0, building and running the application may fail with the message “iOS Simulator failed to install the application.” Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023 Another release note: iOS Simulator If an iOS app is detached, relaunching the same app from Xcode will result in a black screen in the Simulator even though the new app is launched. Terminate the app in the Simulator or relaunch it for the second time. 14648784

Categories : Xcode

Put Xcode files into new folder. Since then, I encounter the following errors when building project in simulator
Go into your project settings, check out the field 'Library Search Paths', and edit it so that it reflects where you moved your code/libraries. The error you're running into here is the linker can't find the Google Analytics library that your app is set up to link against (because you moved it).

Categories : IOS

iOS working in simulator, on iphone via xcode but crashes when copying the archive via itunes
Ok, now i did a: I checked the application:didFinishLaunchingWithOptions: in the appDelegate. Not sure, if it matters, but the the name of the initialized Controller did not match exactly the name it was given during the initializiation. So it set them equal. Made a "Clean" Made a "Build for Archive" Archived it and gave it a different name than before Copied it, and it worked Which step solved the problem, i do not know... but, at the moment, i don't care about it ;-) Thanks for your hints.

Categories : IOS

Xcode Storyboard -> Replace child view controller via push?
If I got your question, I think you've got the right behavior, you can't accomplish what you want by pushing a new UIViewController, you need to manually switch the view, Something like: [currentView removeFromSuperview]; currentView = myNewViewVC.view; [self.containerView addSubview:currentView]; Hope this help.

Categories : IOS

Audio element works fine in Safari but breaks in XCode Simulator (web view)
It seems iOS has some limitations when it comes to HTML5. It appears to be difficult to have more than one audio element and play the second audio element while the first audio element is playing in the background. I have solved the problem by using AVAudioPlayer instead, I use JavaScript to notify the view controller of the web view when I want to play a sound.

Categories : Javascript

Xcode not loading images into my storyboard all of the sudden (blue question marks)
remove images from your app: select images-> right click->delete->move to trash and go to your project folder and if there image exist remove it from there also and now copy all the images to your project. this way will work fine.. yesterday same problem occurred with me.. i solved it this way..

Categories : Iphone

Xcode/iOS-Cannot edit content of Table View Cell...I'm using the storyboard editor
![enter image description here][1]Got it, the cell you used is auto layout, do not check the auto layout in the xib or storyboard! Interface Builder Document->Use Auto Layout Don't check it!

Categories : IOS

Xcode - Visually identify custom views in interface builder / storyboard
That approach of setting the background color in Interface Builder, but resetting it in code is a simple, but effective technique. Two refinements: If you have multiple custom views on a single storyboard scene, you can save yourself from having to programmatically clear the background color for all of them individually by using IBOutletCollection. So, in Interface Builder, give them all background colors and then add all of your custom views for a given scene to a collection. You then can set the background color for all of them in a single statement. So, for example, if you have a dozen controls on one scene all in a single IBOutletCollection is named viewsCollection: @property (strong, nonatomic) IBOutletCollection(UIView) NSArray *viewsCollection; you can clear the background colo

Categories : Xcode

How to make Xcode's Storyboard assistant editor default to .m implementation file
With Xcode 5 the Assistant Editor now opens the .m file (rather than the .h file) by default. If you click the horizontal arrows in the top-right you can jump between the .h and .m files.

Categories : Xcode

Duplicate Storyboard files appeared in Xcode project Directory. Barely able to run project
For each storyboard file name (or really any resource in Xcode) you should only have one source document with that file name. Resources with the same name are all mapping to the same output file, and you're seeing results of this undefined behavior resolve in various ways. So if you have this: ProjectRoot/Base.lproj/MyStoryboard.storybaord ProjectRoot/Folder/Folder/Base.lproj/MyStoryboard.storybaord Then both of those documents map to the same output file. You need to either delete the one at ProjectRoot/Base.lproj or the one at ProjectRoot/Folder/Folder/Base.lproj, but do not keep both documents.

Categories : Iphone

how to add animation to a second view which is inside first view in xcode for ipad using storyboard
If your self.secondview is hidden then you need to make it unhidden and set the alpha to 0. If the secondview is hidden that doesn't mean it's alpha is 0. So use the same code but instead of make it hidden set the secondview.alpha = 0; or in your case make it from the storyboard.

Categories : IOS

Image comparision is not working in ios simulator
You can use highlighted property of UIImageView. Set the checked image as highlightedImage property, and on the click event set: yourImageView.isHighlighed = !yourImageView.isHighlighed; it will automatically show your image as toggle

Categories : Iphone



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