Search Results

Search found 2691 results on 108 pages for 'ios 4'.

Page 49/108 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Upgrade live Universal App to iPad only

    - by Alpár
    Hi. We have a live universal app in the AppStore. Our client changed his mind and doesn't want the app to be universal anymore, he wants it to be iPad only. Since the app was submitted some time ago, there are users who use the iPhone version. What happens if we submit an upgrade that is iPad only? Will the review team reject it? And if it goes live, will the iPhone users receive a notification about the update? If yes in what form? Or will the iPhone users just be unable to reinstall the app? Thank you!

    Read the article

  • When to release the UIImage ?

    - by ragnarius
    I use the following code to draw a subimage UIImage* subIm = getSubImage( large, rect ); [subIm drawInRect:self.bounds]; where getSubImage is defined as follows UIImage* getSubImage(UIImage* uim, CGRect rc){ CGImageRef imref = CGImageCreateWithImageInRect(uim.CGImage, rc); UIImage* sub = [UIImage imageWithCGImage:imref]; CGImageRelease(imref); NSLog(@"subimage retainCount=%d", [sub retainCount]); // is 1 return sub; }//getSubImage Is the code correct? Is it safe to "CGImageRelease" imref? Has sub "CGImageRetained" imref? Should I release subIm (I get an error if I do)? Is subIm contained in the autorelease-pool, and , if so, how do I know this? In general, can one check if an object is contained in the autorelease pool (for debugging purpose)?

    Read the article

  • Change storyboard UIImageView to own class with backgroundcolor

    - by Thomas
    I want to draw the background image on my own, so I decided to implement a UIImageView class and connect it in the Storyboard. As first task I just want to set the backgroundcolor of the image on my own, but it's never shown. Image just stays blank. That's the class: class FirstBackgroundImage : UIImageView { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.backgroundColor = UIColor.redColor() } override init() { super.init() self.backgroundColor = UIColor.redColor() } override required init(image: UIImage!) { super.init(image: image) self.backgroundColor = UIColor.redColor() } } That's how i connected it:

    Read the article

  • Make a view to be the primary one in navigation controller?

    - by Earl Grey
    I am using a tabbar, each tab having a navigation controller, and this in turn having a stack of views. Each view is having its own view controller but this is not important now. Lets have a tab 1 with a navigation controller 1 with views A, B, C. The nature of the application dictates however that the view B is the primary one. So what I want is that by default (after first or after relaunch of the app), when I tap the tab 1, I will see the B view together with the back button to A view. How can I achieve this?

    Read the article

  • Memory leak when declaring NSString from ABRecordCopyValue

    - by Ben Thompson
    I am using the following line of code... NSString *clientFirstName = (NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty); The 'analyse' feature on Xcode is saying that this giving rise to a potential memory leak. I am not releasing clientFirstName at all as I have neither alloc or retain'd it. However, I am conscious that ABRecordCopyValue may not be returning an object as say a command like [NSMutableArray arrayWithArray:someArray] would which might mean I am indeed creating a new object that I control and must release. Keen to hear thoughts...

    Read the article

  • Is it possible to recreate User Gestures in iPhone?

    - by MadhavanRP
    I am developing an app and I have encountered a problem that comes down to this scenario: Consider a superview with two buttons(button1,button2) and a text view, all as its subviews. When I click on one button, I display the text view. When I tap on anywhere outside the textview, but in the super view, I need to dismiss the text view. I have added a UITapGestureRecognizer to the super view and it calls a method tap:. In tap:, I get the point of the tap and if it is outside the text view, I dismiss the text view and remove the GestureRecognizer. Now the problem occurs when I tap on button 2. I need to dismiss the text view as well as execute the action for button 2. But it enters tap: and I do not wish to call the button 2's method from there. What I want to know is if it would be possible to emulate the same tap at the same co ordinates after the gesture recognizer is removed? If not what is the way I proceed to solve this issue?

    Read the article

  • Controlling QR Code Scanning Actions

    - by Elijah
    I am looking to create a QR code that does the following: When scanned from inside an application, it dislpays a custom alert, (Ex. "You won $5") When scanned with a different QR code reader (non app) it goes to a mobile web page that directs the user to download the application. My main question is: Can you control what happens when a QR code is scanned by a reader that is not your own? (A 'default' action, if you will)

    Read the article

  • iPhone xcode - Activity Indicator with tab bar controller and multi table view controllers

    - by Frames84
    I've looked for a tutorial and can't seem to find one for a activity indicator in a table view nav bar. in my mainWindow.xib I have a Tab Bar Controller with 4 Tabs controllers each containing a table view. each load JSON feeds using the framework hosted at Google. In one of my View Controller I can add an activity indicator to the nav bar by using: UIActivityIndicatorView *activityIndcator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0,0,20,20)]; [activityIndcator startAnimating]; UIBarButtonItem *activityItem = [[UIBarButtonItem alloc] initWithCustomView:activityIndcator]; self.navigationItem.rightBarButtonItem = activityItem; however and can turn it off by using: self.navigationItem.rightBarButtonItem.enabled = FALSE; But if i place this in my viewDidLoad event it shows all the time. I only want it to show when I select a row in my table view. so I added it at the top of didSelectRowAtIndexPath and the stop line after I load a feed. it shows but takes a second or two and only shows for about half a second. is the an event that firers before the didSelectRowAtIndexPath event a type of loading event? if not what is the standard menthord for implementing such functionality?

    Read the article

  • Are CMAttitude and CATransform3D related by rotational matrices?

    - by Alex Stone
    I'm looking at the core motion class CMAttitude, it can express the device's orientation as a 3x3 rotational matrix. At the same time I've taken a look at the CATransform3D, which encapsulates the view's attitude, as well as scaling. The CATransform3D is a 4x4 matrix. I've seen that the OpenGL rotational matrix is 4x4 and is simply 0001 padded in the 4th row and column. I'm wandering if the CMAttitude's rotational matrix is related to CATransform's matrix? Can I use the device's rotation in space obtained via a rotational matrix to transform a UIView using CATransform3D? My intention is to let the user move the phone and apply the same transform to a UIView on the screen. Bonus question: if they are related, how do I transform a CMAttitude's rotational matrix to CATransform3D?

    Read the article

  • Detect certain characters in a text field

    - by Craig
    What is the easiest way to detect a character in a text field? I want to be able to detect a certain character and replace that character with another specific character. So If I write in a text field... "zyxw" I want it to be replaced with "abcd". I'm a newbie and don't really know where to start with this or how to go about it. If anyone has any methods of doing this, I would really appreciate it.

    Read the article

  • UISegmentedControl is hidden under the titleBar

    - by shay te
    i guess i am missing something with the UISegmentedControl and auto layout. i have a TabbedApplication (UITabBarController), and i created a new UIViewController to act as tab. to the new view i added UISegmentedControl, and place it to top using auto layout. i guess i don't understand completely something , cause the UISegmentedControl is hiding under the titleBar . can u help me understand what i am missing ? thank you . import Foundation import UIKit; class ViewLikes:UIViewController { override func viewDidLoad() { super.viewDidLoad() title = "some title"; var segmentControl:UISegmentedControl = UISegmentedControl(items:["blash", "blah blah"]); segmentControl.selectedSegmentIndex = 1; segmentControl.setTranslatesAutoresizingMaskIntoConstraints(false) self.view.addSubview(segmentControl) //Set layout var viewsDict = Dictionary <String, UIView>() viewsDict["segment"] = segmentControl; //controls self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-[segment]-|", options: NSLayoutFormatOptions.AlignAllCenterX, metrics: nil, views: viewsDict)) self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-[segment]", options: NSLayoutFormatOptions(0), metrics: nil, views: viewsDict)) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }

    Read the article

  • CoreData: Same predicate (IN) returns different fetched results after a Save operation

    - by Jason Lee
    I have code below: NSArray *existedTasks = [[TaskBizDB sharedInstance] fetchTasksWatchedByMeOfProject:projectId]; [context save:&error]; existedTasks = [[TaskBizDB sharedInstance] fetchTasksWatchedByMeOfProject:projectId]; NSArray *allTasks = [[TaskBizDB sharedInstance] fetchTasksOfProject:projectId]; First line returns two objects; Second line save the context; Third line returns just one object, which is contained in the 'two objects' above; And the last line returns 6 objects, containing the 'two objects' returned at the first line. The fetch interface works like below: WXModel *model = [WXModel modelWithEntity:NSStringFromClass([WQPKTeamTask class])]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(%@ IN personWatchers) AND (projectId == %d)", currentLoginUser, projectId]; [model setPredicate:predicate]; NSArray *fetchedTasks = [model fetch]; if (fetchedTasks.count == 0) return nil; return fetchedTasks; What confused me is that, with the same fetch request, why return different results just after a save? Here comes more detail: The 'two objects' returned at the first line are: <WQPKTeamTask: 0x1b92fcc0> (entity: WQPKTeamTask; id: 0x1b9300f0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p9> ; data: { projectId = 372004; taskId = 338001; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); } <WQPKTeamTask: 0xf3f6130> (entity: WQPKTeamTask; id: 0xf3cb8d0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p11> ; data: { projectId = 372004; taskId = 340006; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); } And the only one object returned at third line is: <WQPKTeamTask: 0x1b92fcc0> (entity: WQPKTeamTask; id: 0x1b9300f0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p9> ; data: { projectId = 372004; taskId = 338001; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); } Printing description of allTasks: <_PFArray 0xf30b9a0>( <WQPKTeamTask: 0xf3ab9d0> (entity: WQPKTeamTask; id: 0xf3cda40 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p6> ; data: <fault>), <WQPKTeamTask: 0xf315720> (entity: WQPKTeamTask; id: 0xf3c23a0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p7> ; data: <fault>), <WQPKTeamTask: 0xf3a1ed0> (entity: WQPKTeamTask; id: 0xf3cda30 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p8> ; data: <fault>), <WQPKTeamTask: 0x1b92fcc0> (entity: WQPKTeamTask; id: 0x1b9300f0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p9> ; data: { projectId = 372004; taskId = 338001; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); }), <WQPKTeamTask: 0xf325e50> (entity: WQPKTeamTask; id: 0xf343820 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p10> ; data: <fault>), <WQPKTeamTask: 0xf3f6130> (entity: WQPKTeamTask; id: 0xf3cb8d0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p11> ; data: { projectId = 372004; taskId = 340006; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); }) ) UPDATE 1 If I call the same interface fetchTasksWatchedByMeOfProject: in: #pragma mark - NSFetchedResultsController Delegate - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller { I will get 'two objects' as well. UPDATE 2 I've tried: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(ANY personWatchers == %@) AND (projectId == %d)", currentLoginUser, projectId]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(ANY personWatchers.personId == %@) AND (projectId == %d)", currentLoginUserId, projectId]; Still the same result. UPDATE 3 I've checked the save:&error, error is nil.

    Read the article

  • facebook logout not working properly through FBConnect iphone api

    - by iVipS
    i am executing the following code to logout of faceboook from my iphone app if ([mFacebook isSessionValid]) { [mFacebook logout]; } this code runs successfully and the delegate is called after this in which i am clearing the access token - (void)fbDidLogout { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults removeObjectForKey:@"FBAccessTokenKey"]; [defaults removeObjectForKey:@"FBExpirationDateKey"]; [defaults synchronize]; } but when i again login to facebook, it does not ask for username and password. Can someone please suggest me what wrong am i doing?? Thanks in advance.

    Read the article

  • How to install previously-archived apps from xcode organizer to my iphone

    - by Ben Clayton
    Hi all. Xcode keeps an archive of all the versions of my apps that I've submitted to the app store in the 'archived applications' section. I assumed using this I could install an old version of an app to my device, in order to reproduce any problems my client may have had with that particular version. However, when I try to do this I get an error: 'this executable was signed with invalid entitlements, the entitlements specified in your applications code signing entitlements do not match those specified in your provisioning profile' The original app was signed using our App Store distribution certificate, and I use the Organizer interface to re-sign it using our Developer profile. select the archived app select the version I want to test click 'share' select 'iphone developer' next to identity save to disk (saves the ipa file) then copy the ipa to the device using the little + button you see next to 'applications' on the screen you get when you select the connected device. Then I get the error, and the app isn't installed. Is there something obvious I'm doing wrong here? Or is there a different process to re-install an archived app to my device? Thanks,

    Read the article

  • Xcode: Display Login View in applicationDidBecomeActive

    - by Patrick
    In my app I would like to show a login screen - which will be displayed when the app starts and when the app becomes active. For reference, I am using storyboards, ARC and it is a tabbed bar application. First off, I have this method which returns the topViewController. - (UIViewController *)topViewController:(UIViewController *)rootViewController { if (rootViewController.presentedViewController == nil) { return rootViewController; } if ([rootViewController.presentedViewController isMemberOfClass:[UINavigationController class]]) { UINavigationController *navigationController = (UINavigationController *)rootViewController.presentedViewController; UIViewController *lastViewController = [[navigationController viewControllers] lastObject]; return [self topViewController:lastViewController]; } UIViewController *presentedViewController = (UIViewController *)rootViewController.presentedViewController; return [self topViewController:presentedViewController]; } And I call this method here: - (void)applicationDidBecomeActive:(UIApplication *)application { if ( ... ) { // if the user needs to login PasswordViewController *passwordView = [[PasswordViewController alloc] init]; UIViewController *myView = [self topViewController:self.window.rootViewController]; [myView presentModalViewController:passwordView animated:NO]; } } To an extent this does work - I can call a method in viewDidAppear which shows an alert view to allow the user to log in. However, this is undesirable and I would like to have a login text box and other ui elements. If I do not call my login method, nothing happens and the screen stays black, even though I have put a label and other elements on the view. Does anyone know a way to resolve this? My passcode view is embedded in a Navigation Controller, but is detached from the main storyboard.

    Read the article

  • MonoTouch & SQLite - Cannot open database after previous successful connections

    - by Tanis Draven
    I am having difficulty in reading data from my SQLite database from MonoTouch. I can read and write without any difficulty for the first few screens and then suddenly I am unable to create any further connections with the error: Mono.Data.Sqlite.SqliteException: Unable to open the database file at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x0007e] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs:136 at Mono.Data.Sqlite.SqliteConnection.Open () [0x002aa] in /Developer/MonoTouch/Source/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteConnection.cs:888 I ensure that i dispose and close every connection each time i use it but still i have this problem. For example: var mySqlConn = new SqliteConnection(GlobalVars.connectionString); mySqlConn.Open(); SqliteCommand mySqlCommand = new SqliteCommand(SQL, mySqlConn); mySqlCommand.ExecuteNonQuery(); mySqlConn.Close(); mySqlCommand.Dispose(); mySqlConn.Dispose(); I'm guessing that I'm not closing the connections correctly. Any help would be greatly appreciated.

    Read the article

  • parse JSON . I have server response

    - by GauravBOSS
    i am new in JSON Parsing . i have a server response how i can fetch the "Device Name and Id" of 0 index. thanks in Advance { Successfully = ( { 0 = { DeviceName = Tommy; DeviceTypeId = 1; EMEI = xxxxxx; GId = xxxxx; Id = 105; Pet = "<null>"; PetImage = "352022008228784.jpg"; ProtocolId = xxxx; SimNo = xxxxx; }; } ); }

    Read the article

  • problem with opening link through safari with webview

    - by Desmond
    hi i had encounter a problem opening a web link through safari. this is my code header #import <UIKit/UIKit.h> @interface qrcode_info : UIViewController <UIWebViewDelegate,UIAlertViewDelegate> { } @property (nonatomic, retain) IBOutlet UIWebView *Web; @end //main file #import "qrcode_info.h" @implementation qrcode_info @synthesize Web; -(BOOL)Web:(UIWebView *)Web shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { if (navigationType == UIWebViewNavigationTypeLinkClicked) { [[UIApplication sharedApplication] openURL:[request URL]]; return NO; } return YES; } //[[UIApplication sharedApplication] openURL:[inRequest URL]]; //return NO; - (void)viewDidLoad { [super viewDidLoad]; [Web loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"help" ofType:@"html"] isDirectory:NO]]]; //self.wvTutorial = [[WebViewController alloc] initWithNibName:@”WebView” bundle:[NSBundle mainBundle]]; }

    Read the article

  • Xcode C++ debugging

    - by mousebird
    I'm looking for a way to have the Xcode IDE pick up on the contents of my weird Boost template classes. Basically, classes complex enough that Xcode can't display their contents correctly. Is there something like the Objective C -description method or toString() in Java that Xcode will look for? At the moment I'm just implementing print() methods and invoking them in gdb, but that's likely to confuse other developers.

    Read the article

  • With ARC why use @properties anymore?

    - by trapper
    In non-ARC code retained properties handily take care of memory management for you using the self.property = syntax, so we were taught to use them for practically everything. But now with ARC this memory management is no longer an issue, so does the reason for using properties evaporate? is there still any good reason (obviously other than providing public access to instance variables) to use properties anymore?

    Read the article

  • UITableView UITableViewCell dynamic UILabel Height storyboard

    - by Mikel Nelson
    This isn'an a question, just a results log on an issue I had with XCode 4.5 storyboards and dynamic height UITableCell with a UILabel. The issue was; the initial display of a cell would only show part of the resized UILabel contents, and that the visual UILabel was not resized. It would only display correctly after scrolling off the top of the Table and back down. I did the calculations in hieghtForRowAtIndexPath and sizeToFit the UILabel in rowAtIndexPath. The sizes where coming up ok in debug, but the device was not updating the display with the correct size and UILable.text value. I had created the dynamic UITableCell in a storyboard. However, I had set the width and height to a nominal value (290x44). It turns out, this was causing my issues. I set the width and height to zero (0) in the story board, and everything started working correctly. (i.e. the UILabels displayed at the correct size with full content). I was unable to find anything online on this issue, except for some references to creating the custom table cell with a frame of zero. Turns out, that was really the answer (for me).

    Read the article

  • Issue when I'm trying to draw gradient in swift

    - by bagusflyer
    I got an error when I was trying to draw gradient in Swift code: GradientView.swift:31:40: Could not find an overload for '__conversion' that accepts the supplied arguments Here is my code: let context : CGContextRef = UIGraphicsGetCurrentContext() let locations :CGFloat[] = [ 0.0, 0.25, 0.5, 0.75 ] let colors = [UIColor.redColor().CGColor,UIColor.greenColor().CGColor,UIColor.blueColor().CGColor, UIColor.yellowColor().CGColor] let colorspace : CGColorSpaceRef = CGColorSpaceCreateDeviceRGB() let gradient : CGGradientRef = CGGradientCreateWithColors(colorspace, colors, locations) //CGGradientCreateWithColors(colorspace,colors,locations) let startPoint : CGPoint = CGPointMake(0, 0) let endPoint : CGPoint = CGPointMake(500,500) CGContextDrawLinearGradient(context, gradient,startPoint, endPoint, 0); The problem is the CGGradientCreateWithColors takes CFArray not a normal Swift Array. I have no idea how to convert CFArray to Array and can't find anything in Apple's document. Any idea? Thanks

    Read the article

  • How to avoid keyboard hide & show when focus changes from UITextField and UIWebView?

    - by Manoj
    I have a requirement in which the view contains one native UITextField and one UIWebView. The issue is if I switch the focus from UITextView to UIWebView, the keyboard window flicker(hides and then shows). ie, I got UIKeyboardWillHideNotification and UIKeyboardDidShowNotification But, this is not happening when I switch the other way. ies, I got only UIKeyboardDidShowNotification Is there any way to avoid this flickering effect? Note: I also notices if I have multiple UITextField and UIWebView, this issue is not happening with the same type of views.

    Read the article

  • Core Data: Multiple conditions inside relational aggregate operations

    - by Uzaak
    I have an SQLite table used by Core Data with the following elements: Name: John LastName: Foobar Age: 23 Name: Bob LastName: Baz Age: 37 Name: Peter LastName: Fooqux Age: 32 Name: John LastName: Bar Age: 29 Those are all in a to-many relationship from another object "Company". I need to query the database and retrieve all Company objects with employees called "John" but whose last name does NOT contain "Foo". I did go as far as to make the following predicate: [NSPredicate predicateWithFormat:@"ANY employee.name = 'John'"]; How do I get to filter only by companies whose Johns don't have "Foo" in their last names?

    Read the article

  • Perform Push Segue From a Tab View Controller

    - by user1416492
    I have a Tab Bar Controller App, the tab bar controller is forked into several "tab" view controller, in one of the view controller I want to redirect the user to an other view controller. I create a segue from that tab view controller to the destination view controller and given it an Identifer. And I call "performSegueWithIdentifier" in "viewDidAppear" to redirect the user. It works fine when the segue is "Modal", however since I want to retain the tabs, I want to call the segue through "Push". However, once I change the segue to "Push", it is not working anymore (it does not try to go to the destination view controller). The app did not crash on the simulator but just staying on the origin tab view controller.

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >