Search Results

Search found 8409 results on 337 pages for 'itunes sdk'.

Page 145/337 | < Previous Page | 141 142 143 144 145 146 147 148 149 150 151 152  | Next Page >

  • My 3D object (opengl es) is disappearing behind the iPhone camera view

    - by KLC
    I have an augmented reality iPhone app that I am converting from Core Animation to OpenGL ES 1.1. I have added code that has been modified from the Apple OpenGL template. My problem is that my 3D object , when translating along the negative Z-axis (away from the user), appears to disappear into the camera view, until its completely gone. I have experimented with several solutions, but to no avail. What I have determined: Using the 3D icosahedron from Jeff Lamarche's blog here, the object starts it at 0,0,0 and then translates with decreasing z coordinates. By the time the z value reaches -2.0f, the object is gone. It appears as if it is disappearing behind the camera view. This is how I set my frustrum & viewport (unchanged from Apple's code) glMatrixMode(GL_PROJECTION); size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0); //Grab the size of the screen CGRect rect = self.bounds; glFrustumf(-size, size, -size / (rect.size.width / rect.size.height), size / (rect.size.width / rect.size.height), zNear, zFar); glViewport(0, 0, rect.size.width, rect.size.height); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); What I have tried: The camera view is the main view and several other views are added to it as subviews, including the openGLView. I have commented those views out for test purposes. I have applied CATransforms to move the openGLView in the z direction -500 and +500, and done the same to the camera view. I have also changed the zFar in the above code to 1.0f, and it still disappears at z position of -2.0, which doesn't make sense (shouldn't it disappear at z=1.0?) My experimentation has got me more confused than when I started ( which usually means I am missing a key piece, but I can't figure out what). Thanks for your help.

    Read the article

  • NSTimer freezes the app until it gets fired again?

    - by itai alter
    Hello all, I have a simple app with a button, UIImageView and a NSTimer. The timer is fired up every 5 seconds repeatedly to update the ImageView with a new image, while the button simply stops the timer and switches to another View. The problem is that when I press the button, nothing happens for a few seconds (until the timer fires up again). Is there a way to cause the button to stop the timer and do its job at any given time instead of between intervals of the timer? Thanks!

    Read the article

  • how to detect touch on UIView with UIimage ontop of it?

    - by Silent
    hello all, i want to use a UIview and a UIImage ontop of it with a text box and button i want the user to drag it when the UIview or anything in the view is touched, what would be the best way to implement this method? the UIView is on a single View Controller and using Interface Builder to make my UIviews and UIimages.

    Read the article

  • Making element draggable with Android WebView (ideally, just with Javascript) ?

    - by GJTorikian
    I'm building an app with a build target of 1.5 . I have a variable, WebView browser, that is calling loadUrl to load a static HTML page from my assets folder. In that HTML page, the following JavaScript is defined: var supportsTouch = ('createTouch' in document); ... var w = $('wrapper'); w[supportsTouch ? 'touchmove' : 'onmousemove'] = move; w[supportsTouch ? 'touchend' : 'onmouseup'] = function(event){ dragging = false; }; where move is another function that handles the dragging. Unfortunately, this doesn't seem to work. I cannot figure out a concise list of which touch events are available to Android--is it ontouchmove, or touchmove? Am I supposed to set up an onTouchEvent call back in my Java code, which then launches the JavaScript function?

    Read the article

  • insertNewObjectForEntityForName:inManagedObjectContext: returning NSNumber bug?

    - by beinstein
    I'm relatively well versed in CoreData and have been using it for several years with little or no difficulty. For the life of me, I can't figure out why insertNewObjectForEntityForName:inManagedObjectContext: is all of a sudden returning some sort of strange instance of NSNumber. GDB says the returned object is of the correct custom subclass of NSManagedObject, but when I go to print a description of the NSManagedObject itself, I get the following error: *** -[NSCFNumber objectID]: unrecognized selector sent to instance 0x3f26f50 What's even stranger, is that I'm able to set some relationships and attributes using setValue:forKey: and all is good. But when I try to set one specific relationship, I get this error: *** -[NSCFNumber entity]: unrecognized selector sent to instance 0x3f26f50 I've tried everything from clean all targets, to restarting both mac and iPhone, even editing the model so that the relationship in question is to-one instead of to-many. No matter what I do, the same problem appears. Has anyone ever seen anything like this before?

    Read the article

  • Error, could not create MachMessagePort for database doctor (com.apple.addressbook.migrationdaemon)

    - by user262998
    I'm working in address book for iphone. it generate address into UILabel. when I'm running the application everything goes well, but after showing about %30 of the addresses and sadenly stopped without any reason! Only in terminal shows: Error, could not create MachMessagePort for database doctor (com.apple.addressbook.migrationdaemon) starting in process migration Please help me!

    Read the article

  • iPhone slide view passing variables

    - by sebastyuiop
    Right, I'm trying to make an app that has a calculation that involves a stopwatch. When a button on the calculation view is clicked a stopwatch slides in from the bottom. This all works fine, the problem I can't get my head around is how to send the recorded time back to the previous controller to update a textfield. I've simplified the code and stripped out most irrelevant stuff. Many thanks. CalculationViewController.h #import <UIKit/UIKit.h> @interface CalculationViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { IBOutlet UITextField *inputTxt; } @property (nonatomic, retain) UITextField *inputTxt; - (IBAction)showTimer:(id)sender; @end CalculationViewController.m #import "CalculationViewController.h" #import "TimerViewController.h" @implementation CalculationViewController - (IBAction)showTimer:(id)sender { TimerViewController *timerView = [[TimerViewController alloc] init]; [self.navigationController presentModalViewController:timerView animated:YES]; } TimerViewController.h #import <UIKit/UIKit.h> @interface TimerViewController : UIViewController { IBOutlet UILabel *time; NSTimer *myTicker; } - (IBAction)start; - (IBAction)stop; - (IBAction)reset; - (void)showActivity; @end TimerViewController.m #import "TimerViewController.h" #import "CalculationViewController.h" @implementation TimerViewController - (IBAction)start { myTicker = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(showActivity) userInfo:nil repeats:YES]; } - (IBAction)stop { [myTicker invalidate]; #Update inputTxt on calculation view here [self dismissModalViewControllerAnimated:YES]; } - (IBAction)reset { time.text = @"0"; } - (void)showActivity { int currentTime = [time.text intValue]; int newTime = currentTime + 1; time.text = [NSString stringWithFormat:@"%d", newTime]; } @end

    Read the article

  • ButtonDown and ButtonUp events for Android screen buttons?

    - by Bret
    Is there a way to get an onButtonDown or onButtonUp event for a soft button (i.e. not a physical hardware button, but a button on the screen)? I have a button on the screen that I want the user to hold down for X seconds. To do this I need to capture the buttonDown and buttonUp events separately. Thanks, Bret

    Read the article

  • Password authentication in sqlite3 for iphone

    - by user271753
    Hey Guys .. I am new to programming in Objective C . I checked many tutorials on reading data in sqlite3 , but almost all of them have show the data in UITableView . I have a page where the user types in the password, the password lets say 1234 is saved in the database ( I have created a table already ) . I have got the database into the project folder . I just want a statement like if(databasepassword == correct from the uitextfield ) { show next page } else { password is incorrect.text } I will figure out on how to show the next page and display the password is incorrect.text I just want a method to cross check with the password saved in the database . How can I do that ? Regards

    Read the article

  • UITableView: block cell dragging during reordering

    - by Luca
    Hi I've a problem with UITableView. When I'm in editing mode i want to reorder the cell but e when I drag a cell at the bottom of the screen it's allowed to go down as much as the TableView height and down the last tableViewCell. I've only 4 cell and i want that when Im dragging a cell it's not allowed to go down after the fourth cell. Can Anyone help me?!?

    Read the article

  • UISlider how to set the initial value

    - by slim
    I'm pretty new at this iphone dev stuff and i'm working on some existing code at a company. The uislider i'm trying to set the initial value on is actually in a UITableViewCell and is a custom control. I was thinking in the cell init cell = (QuantitiesCell *)[self loadCellWithNibName:@"QuantitiesCell" forTableView:ltableView withStyle:UITableViewCellStyleDefault]; i could just call something like ((QuantitiesCell *)cell).value = 5; The actual QuantitiesCell class has the member value and the following functions -(void)initCell;{ if (listOfValues == nil) { [self initListOfValues]; } quantitiesSLider.maximumValue = [listOfValues count]-1; quantitiesSLider.minimumValue = 0; quantitiesSLider.value = self.value; } -(void)initListOfValues;{ listOfValues = [[NSMutableArray alloc] initWithCapacity:10]; int j =0; for (float i = minValue; i <= maxValue+increment; i=i+increment) { [listOfValues addObject:[NSNumber numberWithFloat: i]]; if (i == value) { quantitiesSLider.value = j; } j++; } } like i said, i'm pretty new at this so if i need to post more of the code to show whats going to get help, let me know, This slider always is defaulting to 1, the slider ranges usually from 1-10, and i want to set it to a specific value of the item i'm trying to edit.

    Read the article

  • Using CGRectIntersectsRect for collision detection

    - by user309030
    Hi guys, I've got a long rectangular image which is rotated at different kind of angles. However the frame of the rectangular image does not rotate along with the image and instead, the rotation causes the frame to to become larger to fit the rotated image. So when I used CGRectIntersectsRect, the collision detection is totally off because the other image colliding with the rectangular image will collide before it even reaches the visible area of the rect image. In case you don't really know what I'm talking about, have a look at the ascii drawing: normal rectangular image frame, O - pixels, |, – - frame |----------| |OOOOOOOOOO| |----------| after rotation |----------| |O | | O | | O | | O | | O | | O | | O | | O | | O | |----------| I've read through some of the collision articles but all of them are talking about collision with a normal straight rectangle and what I really want is collision with a slanted image, preferably pixel collision detection. TIA for any suggestions made.

    Read the article

  • How to add uitoolbar to uitableviewcontroller?

    - by Jakub
    I have an UITableViewController which I would like to add UIToolbar to with one button. In the - (void)viewDidLoad; method of UITableViewController I have: - (void)viewDidLoad { [super viewDidLoad]; UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(pressButton1:)]; self.navigationItem.title = @"Some title"; self.navigationItem.leftBarButtonItem = button; } Unfortunately I don't see the toolbar when I run my app. Any hints? Should I do something more?

    Read the article

  • touchesEnded Sound?

    - by NextRev
    I'm trying to play a sound on touchesEnded but I'm having a problem. There are multiple objects that get moved around, so if the below code holds true when any object is moved, it constantly plays the sound. How do I only play it once? -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ if(CGRectContainsRect([image1 frame], [image2 frame])){ [self playsound]; } }

    Read the article

  • Getting differences between WVGA800 and WVGA854 in Android Emulator

    - by Droidy
    So far I just have one XML layout file, and one drawable directory, drawable-hdpi. I first want to target the high density screens. I added a bunch of imagebuttons to a relativelayout and everything looks perfect in the WVGA800 emulator. The problem arises when I view it in the WVGA854 emulator. Not only do the imagebuttons not position the same, but the images are blurry. I used dip for the layout margins on the imagebuttons even though it shouldn't matter in this case because WVGA800 and 854 are both high density. What is the problem? Why would it look totally different on emulators that have the same density and almost have the same exact screen dimensions? Thanks!

    Read the article

  • How can I add settings in the settings application for the iPhone

    - by Eytan
    I have my user preferences set to display in the system-settings application BUT I want to give them the option of adding additional settings. Specifically, the user has a group 'favorites' in the settings bundle and they then can put in the details of their three favorite contacts. However, I want to give the user the option of adding more. I know how to do this with inapp but can this be done through the settings application?

    Read the article

  • Saving a project as an .ipa

    - by itai alter
    Hello all! I wrote an app for the iPad, but I don't currently own an iPad. I would like to save my project as an .ipa file (assuming it's .ipa for the iPad, like the iPhone) so I could send it to a friend with a Jailbroken iPad to test it on an actual device before I release it to the App Store. Is there any way I can do this? Thanks a bunch!

    Read the article

  • Android 1.5/1.6 issue with style and autogenerated R.java file

    - by Gaks
    I'm having strange issue with R.java file and styles defined in my resources. Here's some code: In res/values/strings.xml: <style parent="android:Theme.Dialog" name="PopupWindowStyle"> <item name="android:windowBackground">@drawable/bg1</item> <item name="android:textColor">@android:color/black</item> </style> In AndroidManifest.xml: <activity android:name=".RegisterScreen" android:icon="@drawable/ico" android:label="@string/applicationName" android:theme="@style/PopupWindowStyle" android:configChanges="locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|fontScale"> </activity> In autogenerated gen/.../R.java: public static final class style { public static final int PopupWindowStyle=0x7f090000; } After some changes in the project, eclipse changed autogenerated value for PopupWindowStyle from 0x7f080000 to 0x7f090000. After that, on Android 1.5, RegisterScreen activity is displayed without PopupWindowStyle style - there is an error displayed in logcat: Skipping entry 0x7f090000 in package table 0 because it is not complex! On Android 1.6 however everything works fine - PopupWindowStyle works like it was before it's integer value has changed. I was testing this issue, by reverting the source code to older revisions. I can confirm, that this problem started occurring after src code commit, which changed two files completely unrelated to this part of code - and an autogenerated R.java file. Any idea what could cause that?

    Read the article

  • Annoying white border when rotating a view in iPad

    - by Horace Ho
    When rotating a View from UIInterfaceOrientationPortrait to UIInterfaceOrientationPortraitUpsideDown on the iPad simulator, there is a white border along one side of the view (see diagram, lower left of the image). The white border shows only on one side, but not the opposite side. How can I prevent (hide) it? Thanks!

    Read the article

  • Displaying popup images on button click

    - by Anees
    Hi experts, Please refer the image given in the url http://docs.google.com/Doc?docid=0AQhgDtGvE2HgZGZ6cmtua185M2RneG5nYmNm&hl=en My query is, How can I display the messages corresponding to the rounded buttons and the table row , when I click on the rounded button with question mark. I know, I have to use listener for the ? button , but what should I do in listener exactly, such that when I click, it shows those alerts(images) and when I click again, it disappears. Please help. Any help in this regard is well appreciated. Regards, Rony

    Read the article

< Previous Page | 141 142 143 144 145 146 147 148 149 150 151 152  | Next Page >