iphone,ios,objective-c,uinavigationcontroller,ecslidingviewcontrollerRelated issues-Collection of common programming errors


  • Black Frog
    iphone objective-c cocoa-touch
    I’m stuck! I can’t see why viewWillAppear doesn’t run in my code but viewDidLoad runs. If I understand it correctly viewDidLoad runs once on the first instance and viewWillAppear runs every time a view is added to the stack of views to display.I see others have had this issue but some how their solutions of calling viewWillAppear directly causes my app to crash. Other solutions were related to Navigation Controller and pushingView’s but thats not what i’m using either! What am I missing?Than

  • César Bustíos
    iphone ios xcode uiviewcontroller ios5
    All I need is to view a UIView controller in same storyboard file manually with code. I use storyboard to make all forms and connections. My application starts in navigation controller, which provides me access to UIView (LoginViewController) and then it goes to tab bar controller, which provides 4 UIViews. According to every UIView I have .h and .m files. I know about segue method, it is simple, but I need manual method. Maybe I am doing something wrong.I was trying to use this method for pushi

  • Christopher Pickslay
    objective-c iphone localization nslocalizedstring
    I have a template for an email that I’ve put in a localized strings file, and I’m loading the string with the NSLocalizedString macro.I’d rather not make each line its own string with a unique key. In Objective-C, I can create a human-readable multiline string like so:NSString *email = @”Hello %@,\n””\n””Check out %@.\n””\n””Sincerely,\n””\n””%@”;I tried to put that in a .strings file with:”email” = “Hello %@,\n””\n””Check out %@.\n””\n””Sincerely,\n””\n””%@”;But I get the following error at bui

  • luaLover
    iphone ios lua corona
    I followed a guide (that can be found at http://sree.cc/corona-sdk/detect-microphone-volume-blowing-into-microphone) to try to detect the microphone volume.The code I’ve used is:local _w = display.contentWidth local _h = display.contentHeightlocal background_ = display.newRect(0,0,_w,_h) background_:setFillColor(255) local text_ = display.newText(“Initial.”,200,10,nil,30) text_:setTextColor(0)local r = media.newRecording() r:startRecording() r:startTuner()function soundDetector( event ) local v

  • hafedh
    iphone xcode json
    I’m working in some iPhone app thats shows many apps from the app store and I want to get their info using json. I was able to do that for a single app, but now i’m trying to get info for all my apps that i stored their identifiers used in the JSon URL, in an NSMutableArray.The problem that I get the info for only the first item in my array, and for the others I get this error : -JSONValue failed. Error trace is: ( “Error Domain=org.brautaset.JSON.ErrorDomain Code=11 \”Unexpected end of string\”

  • Jeff
    iphone cocoa-touch uinavigationcontroller rotation
    I have a UIViewController that returns YES in shouldAutorotateToInterfaceOrientation: for UIDeviceOrientationPortrait and NO for everything else. With that view on the top of the stack, I use pushViewController:animated: to push a new UIViewController. The new controller returns YES for anything in shouldAutorotateToInterfaceOrientation:.The first view refuses to rotate (as expected). Once the second view is pushed, the user can rotate the device and the UI will rotate (also as expected). If the

  • sribharanidharan subramanian
    iphone objective-c json
    i’m using json Framework for sending the jsonstring. my json post string is {“firstName”: “string1″,”lastName”: “string2″,”contactSource”: “Leter”,”permanentAddress”: {},”deliveryAddress”: {},”preferredContactTimes”: [] }my coding……NSString *postString = [NSString stringWithFormat:@”[\”firstName\”:\”barani\”,\”lastName\”:\”Tharn\”,\”contactSource\”:\”Leter\”,\”permanentAddress\”:{},\”deliveryAddress\”:{},\”preferredContactTimes\”:[]]”,fName.text,lName.text,contactSource.text,address,address,

  • tanmaykhandelwal
    iphone ios uialertview becomefirstresponder
    I have subclassed UIAlertView and inside which I am showing a textField which takes the input. When user clicks on textField the keyboard shows up and UIAlertView moves up to adjust for keyboard. But when I do [textField becomeFirstResponder] in didPresentAlertView delegate method of UIAlertView, the alertView doesn’t moves up to adjust for keyboard. Instead the UIAlertView gets hidden behind the keyboard.PS – I know that Apple says that UIAlertView should not be subclassed and to be used as it

  • Felics
    iphone ios opengl-es
    I’m using CADisplayLink to fire the “update” event for a very simple OpenGL ES animation on iOS. The animation has around 10 textured quads. I tried to run this at 60 FPS and I saw some glitches. When changing this to 30 FPS the animation runs smoother. After profiling this I saw that the most of the time is spent in presentRenderBuffer.These are the results:m_displayLink.frameInterval = 2;[379406923.204] Update time 0.000358 [379406923.206] Render time 0.001402 [379406923.207] Present time 0.00

  • Matthew Frederick
    iphone ios uitableviewcell xib reusability
    I’ve got three different UITableViews, each in it’s own view, accessed via tabs. All three tables would ideally share the same custom UITableViewCell class and .xib file. I started with one table, setting the class of the .xib to my custom class and the File’s Owner of the .xib to the table’s parent UIViewController, which works great. All of the custom view-related code is in the cell’s class (background images based on a property set by the controller, custom cell height based on the number of

  • Brad Robinson
    ios xcode ios7
    What exactly does iOS 7 use to determine whether the application should be displayed with the traditional iOS 6 style UI (aka iOS6 compatibility mode), or the newer iOS 7 UI?If I build our app in Xcode 5, with base SDK set to 7 I get the iOS 7 UI as expected If I build our app in Xcode 5, with base SDK set to 6 I still get the iOS 7 UI (unexpected, happens on real device and simulator) If I build in Xcode 4.x, I get the older UI as expectedIn all cases, the deployment target is set to 5.Since ou

  • Darren
    ios xcode xcode4 uistoryboard
    I’m just starting my first application using storyboards. I’m using Xcode 4.5 and iOS 6 SDK. I want to know how to change the order in which the controllers are listed in the Document Outline (panel to the left of the storyboard).

  • Jonny
    ios xcode
    All of a sudden today I get an unexpected problem with XCode (5).This is how I normally add an external framework:Drag-n-drop the file (xxx.framework etc) (or the folder which contains the file) into the project manager. In “Choose options for adding files” I check “Copy items into destination (if needed)” only if needed (if the files are already in the project’s folder I don’t do this) In “Folders” I select Create groups for any added folders And I add it to my app target.Normally this would al

  • César Bustíos
    iphone ios xcode uiviewcontroller ios5
    All I need is to view a UIView controller in same storyboard file manually with code. I use storyboard to make all forms and connections. My application starts in navigation controller, which provides me access to UIView (LoginViewController) and then it goes to tab bar controller, which provides 4 UIViews. According to every UIView I have .h and .m files. I know about segue method, it is simple, but I need manual method. Maybe I am doing something wrong.I was trying to use this method for pushi

  • luaLover
    iphone ios lua corona
    I followed a guide (that can be found at http://sree.cc/corona-sdk/detect-microphone-volume-blowing-into-microphone) to try to detect the microphone volume.The code I’ve used is:local _w = display.contentWidth local _h = display.contentHeightlocal background_ = display.newRect(0,0,_w,_h) background_:setFillColor(255) local text_ = display.newText(“Initial.”,200,10,nil,30) text_:setTextColor(0)local r = media.newRecording() r:startRecording() r:startTuner()function soundDetector( event ) local v

  • Lance
    ruby-on-rails ios ruby-on-rails-3 apple-push-notifications
    I have the apn_for_rails gem installed and configured correctly, the problem I’m running into is probably a syntax problem due to my newness to Ruby on Rails.I have this in /models under the file push_notification.rbclass ApnDevice < ActiveRecord::Baseendin routes.rbmatch ‘/api/v2.0/RegisterIOSDevice’, :to => Api::V_2_0::ApiNotificationsand then I have another file in /lib/api/v_2_0 called api_notifications.rbrequire ‘rubygems’ require ‘sinatra/base’ require ‘nokogiri’ require

  • tanmaykhandelwal
    iphone ios uialertview becomefirstresponder
    I have subclassed UIAlertView and inside which I am showing a textField which takes the input. When user clicks on textField the keyboard shows up and UIAlertView moves up to adjust for keyboard. But when I do [textField becomeFirstResponder] in didPresentAlertView delegate method of UIAlertView, the alertView doesn’t moves up to adjust for keyboard. Instead the UIAlertView gets hidden behind the keyboard.PS – I know that Apple says that UIAlertView should not be subclassed and to be used as it

  • khushbu
    objective-c ios json web-services
    I want to fetch some data from some url and print result in nslog. I am passing URl and want to fetch result in log only. I have used this code :-(void)GETJSONDATA {NSString*lu=@”tmp”;NSString *requestString = [[NSString alloc]init];// [[NSUserDefaults standardUserDefaults] setValue:nil forKey:@”WRONGANSWER”];NSLog(@”request string:%@”,requestString);NSData *requestData = [NSData dataWithBytes: [requestString UTF8String] length: [requestString length]];NSMutableURLRequest *request = [[NSMutableU

  • Donald Burr
    ios xcode provisioning-profile
    I am an individual developer signed up with both the iOS and Mac development programs. My account is paid up and in good standing. Recently when logging into iTunes Connect, I was told that my password was too old and was asked to change it, which I did. I also decided to set up two factor authentication on my Apple ID while I was at it.Unfortunately I can now no longer refresh my provisioning profiles in Xcode (5.0.2 (5A3005)) I get the errorAn unexpected error occurred. Please try again. I

  • Felics
    iphone ios opengl-es
    I’m using CADisplayLink to fire the “update” event for a very simple OpenGL ES animation on iOS. The animation has around 10 textured quads. I tried to run this at 60 FPS and I saw some glitches. When changing this to 30 FPS the animation runs smoother. After profiling this I saw that the most of the time is spent in presentRenderBuffer.These are the results:m_displayLink.frameInterval = 2;[379406923.204] Update time 0.000358 [379406923.206] Render time 0.001402 [379406923.207] Present time 0.00

  • Black Frog
    iphone objective-c cocoa-touch
    I’m stuck! I can’t see why viewWillAppear doesn’t run in my code but viewDidLoad runs. If I understand it correctly viewDidLoad runs once on the first instance and viewWillAppear runs every time a view is added to the stack of views to display.I see others have had this issue but some how their solutions of calling viewWillAppear directly causes my app to crash. Other solutions were related to Navigation Controller and pushingView’s but thats not what i’m using either! What am I missing?Than

  • bobobobo
    objective-c dynamic-binding
    Objective-C uses dynamic binding: that is method calls are resolved at runtime.Fine. And use of dot notation really boils down to a method callBut, why then, can’t I do something like this:#import <Foundation/Foundation.h>int main (int argc, const char * argv[]) {NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];// Intercept the exception@try{@throw [ NSException exceptionWithName:@”Exception named ME!” reason:@”Because i wanted to” userInfo:nil ] ;}@catch( id exc ) // pointer

  • Rodney Foley
    objective-c notifications ios5
    If you have a full screen iOS app and you want to prevent the notification center from being pulled down, can you and how? Also can you block notification alerts or banners from displaying while your app is loading? (I think this is a no way for sure but wanted to ask just in case.)

  • Christopher Pickslay
    objective-c iphone localization nslocalizedstring
    I have a template for an email that I’ve put in a localized strings file, and I’m loading the string with the NSLocalizedString macro.I’d rather not make each line its own string with a unique key. In Objective-C, I can create a human-readable multiline string like so:NSString *email = @”Hello %@,\n””\n””Check out %@.\n””\n””Sincerely,\n””\n””%@”;I tried to put that in a .strings file with:”email” = “Hello %@,\n””\n””Check out %@.\n””\n””Sincerely,\n””\n””%@”;But I get the following error at bui

  • sribharanidharan subramanian
    iphone objective-c json
    i’m using json Framework for sending the jsonstring. my json post string is {“firstName”: “string1″,”lastName”: “string2″,”contactSource”: “Leter”,”permanentAddress”: {},”deliveryAddress”: {},”preferredContactTimes”: [] }my coding……NSString *postString = [NSString stringWithFormat:@”[\”firstName\”:\”barani\”,\”lastName\”:\”Tharn\”,\”contactSource\”:\”Leter\”,\”permanentAddress\”:{},\”deliveryAddress\”:{},\”preferredContactTimes\”:[]]”,fName.text,lName.text,contactSource.text,address,address,

  • Tahanie ALsanie
    objective-c json cocoa json-framework
    how solve this excepetion-JSONValue failed. Error trace is: (“Error Domain=org.brautaset.JSON.ErrorDomain Code=11 \”Unexpected end of string\” UserInfo=0x6173d50 {NSLocalizedDescription=Unexpected end of string}”this is my code- (void)connectionDidFinishLoading:(NSURLConnection *)connection {NSString *str = [[[NSString alloc] initWithData:buffer encoding:NSUTF8StringEncoding] autorelease];NSArray *array = [str JSONValue];if (!array)return;NSDateFormatter *fmt = [[[NSDateFormatter alloc] init] au

  • khushbu
    objective-c ios json web-services
    I want to fetch some data from some url and print result in nslog. I am passing URl and want to fetch result in log only. I have used this code :-(void)GETJSONDATA {NSString*lu=@”tmp”;NSString *requestString = [[NSString alloc]init];// [[NSUserDefaults standardUserDefaults] setValue:nil forKey:@”WRONGANSWER”];NSLog(@”request string:%@”,requestString);NSData *requestData = [NSData dataWithBytes: [requestString UTF8String] length: [requestString length]];NSMutableURLRequest *request = [[NSMutableU

  • Stanislaw
    objective-c
    The post Compiling Objective-C without GUI says the following:To compile Objective-C on OSX the easy way you have to get XCode, which is free to obtain from the Application Store. Getting XCode will ensure you obtain the necessary frameworks (headers), like Foundation, Cocoa, etc. This will, however, not provide you with the necessary command line tools to compile Object-C from the command line. Open up XCode, go to Preference > Downloads > Components and Install Command Line Tools. This will in

  • Jeremy L
    objective-c properties
    I was originally going to write:-(void) setLeftChild:(NSNode *) leftChildNode {_leftChildNode = leftChildNode;leftChildNode.parent = self;// … }to set all the appropriate values for a node’s child, and the child node’s parent node should point back to self, and the child node’s tree object should be the same as parent’s tree object (the tree where the nodes belong to).But then I realized that doing so will affect the simple line node.leftChild = something; So this line will have “side effects

  • Raffaeu
    objective-c xcode
    I have created a new Xcode 4.2 Cocoa project, a cocoa library. By default, the unit tests come with the following unit test:- (void)testExample {STFail(@”Unit tests are not implemented yet in learning01Tests”); }If I press ?U I can see the test building and failing as expected. Now, I add the new following lines in order to test an external class I have created:#import “svc01.h”- (void)testMyClass {svc01* svc = [[svc01 alloc]init];int expected = [svc addTwoNumbers:10 :10];STAssertTrue(21 == expe

  • Jeff
    iphone cocoa-touch uinavigationcontroller rotation
    I have a UIViewController that returns YES in shouldAutorotateToInterfaceOrientation: for UIDeviceOrientationPortrait and NO for everything else. With that view on the top of the stack, I use pushViewController:animated: to push a new UIViewController. The new controller returns YES for anything in shouldAutorotateToInterfaceOrientation:.The first view refuses to rotate (as expected). Once the second view is pushed, the user can rotate the device and the UI will rotate (also as expected). If the

  • tacos_tacos_tacos
    iphone objective-c ios uinavigationcontroller uialertview
    I use the following code to handle failed requests.- (void)requestFailed:(ASIHTTPRequest *)request {[self.alertView dismissWithClickedButtonIndex:0 animated:YES];UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”Request failed.” message:requestFailMessage delegate:self cancelButtonTitle:@”OK” otherButtonTitles:nil];[alert show];[self.navigationController popViewControllerAnimated:YES]; }To simulate, I turn on “Airplane Mode.” I try the request, and it fails. After I press the “OK” button

  • sobox studio
    iphone ios ipad animation uinavigationcontroller
    I know this is an error that has been explained at length in numerous other questions. However it still seems to be a topic for debate as its highly subjective. I have two questions;How detrimental is this error?I’ve been working on an app that requires a custom UINavigationController. I create a false root that allows me to change the perceived root more easily. To create this affect I ‘pop’ to the false root then immediately ‘push’ the new one. Like this;[self popToViewController:self.fakeRoot

  • rmaddy
    ios uinavigationcontroller master-detail
    I have a tableview set up as a Master-Detail view for iPad and I am having a problem with the navigation getting corrupted. The link between the Master and Detail is a Push-Detail split, I need it this way as the user can then navigate within the detail and the master stays as what it is. The problem is that if you tap through the Master side too quickly I get navigation corrupted messages such as Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get

  • Snick
    ios iphone objective-c uitableview uinavigationcontroller
    I have a UINavigationController which goes into a ViewController that loads data. This ViewController then segues to TabViewController. This TabViewController has two tabs, each Tab goes to a different UITableViewController. Those two TableViewController then segue to the same DetailsViewController. Now when navigating backwards from the DetailVC I get this error:nested push animation can result in corrupted navigation barFinishing up a navigation transition in an unexpected state.Navigation Ba

  • anijam
    iphone ios uinavigationcontroller
    I have an app that utilizes a UINavigation controller in a storyboard to go through two UITableViews to get to the details view. I want to skip the second Table View and go straight to the Detail View. When the user taps ‘back’, they should see the Second Table View.If I use [self.navigationController pushViewController:secView animated:NO];[self.navigationController pushViewController:thirdView animated:YES];the app bugs out and I get nested push animation can result in corrupted navigation bar

  • user1897723
    iphone objective-c ios uitableview uinavigationcontroller
    I’m trying to push NEOfficesDetailViewController from NEOfficesRootViewController in didSelectRowAtIndexPath: UITableView’s delegate method. This UITableView has NSFectherResultsController attached to it.Everything works fine in the common situation, but if I tap multiple times on the table’s row while my NSFetcherResultsController’s context is changing (single context, all changes on the main thread) the didSelectRowAtIndexPath: method will be called multiple times and this will results in nest

  • Brian
    ios uinavigationcontroller ios7
    I have a XTableViewController. When I click its cell, the navigationController will push to the next YViewController.While the push animation, cells in the XTableView are still visible in the YView, which is abnormal:What even worse is that the cells will not move outside the visible area smoothly, it will stick on the way and disappear suddenly. I don’t want this behavior. I want a normal push animation, which doesn’t have any overlap between two views. I am sorry that I totally have no idea ab

  • jini
    ios uinavigationcontroller pushviewcontroller
    To the best of my knowedge I do not believe I am doing anything wrong however I am getting:2011-04-02 14:55:23.350 AppName[42430:207] nested push animation can result in corrupted navigation bar 2011-04-02 14:55:23.352 AppName[42430:207] nested push animation can result in corrupted navigation bar 2011-04-02 14:55:23.729 AppName[42430:207] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted. 2011-04-02 14:55:23.729 AppName[42430:207] Finis

  • NSUserDefault
    iphone uinavigationcontroller ios6 uiinterfaceorientation
    I created an app in ios 6 with navigation view.Also I have set all orientation options in the application summary and even used the-(BOOL) shouldAutoRotateand -(NSUInteger) supportedInterfaceOrientaionmethods in my view controller.when I run my app orientation works fine except upside-down.What should I do to also support upside-down.I also facing the same problem when I add UITabBar controller.Please share your ideas.Thank you

  • 80leaves
    ios ecslidingviewcontroller
    I’m trying to rebuild the Basic Example and whenever I start my application I end up with following error message:* Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key topViewControllerStoryboardId.’ * First throw call stack:I just don’t know where to keep looking.

  • XCode Monkey
    iphone ios objective-c ecslidingviewcontroller
    I have a little problem with my app.I am using ECSlidingViewController.Here’s a overview:On the ViewController.h:#import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> #import “ECSlidingViewController.h” #import “MenuViewController.h”@interface ViewController : UIViewController@property (strong, nonatomic) UIButton *menuBtn;@endOn the ViewController.m:#import “ViewController.h”@interface ViewController ()@end@implementation ViewController @synthesize menuBtn;- (void)viewDidLoad {[

  • Marcel Marino
    ios uiviewcontroller storyboard ecslidingviewcontroller
    I am using a storyboard to switch between views. Pretty simple, until I try to add ECSlidingViewController.If I add the above slide menu to the first view I call using this:self.topViewController = [self.storyboard instantiateViewControllerWithIdentifier:@”Main”];If I set @”Main” to @”Speakers”, the view loads just fine. I get the slide menu and everything. @”Main” also loads just fine.However, if I load @”Main” first like in the code above, then switch views to the one I’ve designated “Speakers

  • Pinturikkio
    iphone ios objective-c uinavigationcontroller ecslidingviewcontroller
    In my app I’ve a navigation Controller that is connected to another viewController (root controller). In my project I’ve imported ECSlidingViewController.h and .m. In the viewController that will be used as a right-side menu (listViewController.h), I’ve imported ECSlidingViewController.h and in viewDidLoad I did this:[super viewDidLoad];self.peekLeftAmount = 40.0f;[self.slidingViewController setAnchorLeftPeekAmount:self.peekLeftAmount];self.slidingViewController.underRightWidthLayout = ECVariabl

Web site is in building