Search Results

Search found 9025 results on 361 pages for 'quad core'.

Page 62/361 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • implementation musical instrument using audio unit

    - by Develop.Kim
    post same question at apple developer forum ,too hi first sorry that my english is poor.. i want develop iphone application that playing musical instrument like 'ocarina' but don't need blow mic features. so first i tried to find that how implementation 'virtual musical instrument ' in iphone development. the during the decide implementation using 'Audio Unit' to report this article (link) so i want two kind of questions. i recognize that the 'musical instrument' can be divided into three sound that 'attack', 'sustain' , 'release'. 'decay' maybe included (link) . How implementation when audio unit base 'AUInstrumentBase' each sound ? i download sample 'SinSynth' (link) . i want play note this instrument unit for analyze source and study. Is there way to using AULab? expected the way using MIDI input . but i don't have MIDI. in addition, i wonder that i would think it right the way. to ask the advice... thank for reading poor english my article.

    Read the article

  • Draw points in a view on iPhone screen?

    - by micropsari
    Hello, in my class I have an attribute IBOutlet UIImageView *imageView; And if I want to draw an image in this view I do : imageView.image = [UIImage imageNamed:@"foo.png"]; But how can I do to draw some points with coordinate x, y (in pixel) directly in the view ? Thanks !

    Read the article

  • Mirroring a portion of the screen to an external display (in OSX)

    - by Adam
    I would like to write a program that can mirror a portion of the main display into a new window. Ideally this new window could then be displayed on an external monitor. I have seen this uiltity for a flightsim that does this on a pc (a multifunction display extractor). MFDex http://trac2.assembla.com/lightnings..._x86_Setup.msi I have looked at screen magnifiers or vnc clients for ideas but I think I need to write something from scratch. I have tried to do some reading on osx programing but where do I start in terms of gaining access to the display? I somehow need to extract the graphics from a particular program. Is it best to go near the final output stage (the individual pixels sent to the display) or somewhere nearer the window management stage. Any ideas or pointers would be much appreciated. I just need somewhere to start from. Regards,

    Read the article

  • Extending a view to the left side, animated

    - by Heinrich
    Hi, I have a view that I want to extend on the left side using an animation. All borders but the left one should remain the same, so the x position and the width of the view are changing. I use this code: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:5.0]; self.frame = CGRectMake(self.frame.origin.x-100, self.frame.origin.y, self.frame.size.width+100, self.frame.size.height); [UIView commitAnimations]; If I run this code, the width of the view is set to the new value immediately and then the view is moved to the new x point, but why? How can I change this behaviour? Thanks for your ideas!

    Read the article

  • Dealloc'd Predicate crashing iPhone App!

    - by DVG
    To preface, this is a follow up to an inquiry made a few days ago: http://stackoverflow.com/questions/2981803/iphone-app-crashes-when-merging-managed-object-contexts Short Version: EXC_BAD_ACCESS is crashing my app, and zombie-mode revealed the culprit to be my predicate embedded within the fetch request embedded in my Fetched Results Controller. How does an object within an object get released without an explicit command to do so? Long Version: Application Structure Platforms View Controller - Games View Controller (Predicated upon platform selection) - Add Game View Controller When a row gets clicked on the Platforms view, it sets an instance variable in Games View for that platform, then the Games Fetched Results Controller builds a fetch request in the normal way: - (NSFetchedResultsController *)fetchedResultsController{ if (fetchedResultsController != nil) { return fetchedResultsController; } //build the fetch request for Games NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Game" inManagedObjectContext:context]; [request setEntity:entity]; //predicate NSPredicate *predicate = [NSPredicate predicateWithFormat:@"platform == %@", selectedPlatform]; [request setPredicate:predicate]; //sort based on name NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [request setSortDescriptors:sortDescriptors]; //fetch and build fetched results controller NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:request managedObjectContext:context sectionNameKeyPath:nil cacheName:@"Root"]; aFetchedResultsController.delegate = self; self.fetchedResultsController = aFetchedResultsController; [sortDescriptor release]; [sortDescriptors release]; [predicate release]; [request release]; [aFetchedResultsController release]; return fetchedResultsController; } At the end of this method, the fetchedResultsController's _fetch_request - _predicate member is set to an NSComparisonPredicate object. All is well in the world. By the time - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section gets called, the _predicate is now a Zombie, which will eventually crash the application when the table attempts to update itself. I'm more or less flummoxed. I'm not releasing the fetched results controller or any of it's parts, and the only part getting dealloc'd is the predicate. Any ideas?

    Read the article

  • Endless saving of CoreData Context

    - by Robert
    Sometimes I noticed that a 'save:' operation an a ManagedObjectContext never returns and consumes 100% CPU. I'm using an SQL Store in a GarbageCollected environment (Mac OS X 10.6.3). The disk activity shows about 700 KB/s writing. While having a look at the folder that contains the sqlite database file the "-journal" file appears and disappears, appears and disappears, ... This is part of the call graph from the process analysis: 2203 -[NSManagedObjectContext save:] 1899 -[NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:] 1836 -[NSSQLCore executeRequest:withContext:] 1836 -[NSSQLCore saveChanges:] 1479 -[NSSQLCore performChanges] ... 335 -[NSSQLCore recordChangesInContext:] ... 20 -[NSSQLCore rollbackChanges] ... 2 -[NSSQLCore prepareForSave:] ... 62 -[NSPersistentStoreCoordinator(_NSInternalMethods) _checkRequestForStore:originalRequest:andOptimisticLocking:] ... 1 -[NSPersistentStore(_NSInternalMethods) _preflightCrossCheck] ... 184 -[NSMergePolicy resolveConflicts:] ... 120 -[NSManagedObjectContext(_NSInternalChangeProcessing) _prepareForPushChanges:] ... Everything a happening in the main GUI thread. Any ideas what I can to do to resolve the problem?

    Read the article

  • Is there any seriously good reason why a view can not completely manage itself?

    - by mystify
    Example: I have an warning triangle icon, which is a UIImageView subclass. That warning is blended in with an animation, pulses for 3 seconds and then fades out. it always has a parent view! it's always only used this way: alloc, init, add as subview, kick off animation, when done:remove from superview So I want this: [WarningIcon warningAtPosition:CGPointMake(50.0f, 100.0f) parentView:self]; BANG! That's it. Call and forget. The view adds itself as subview to the parent, then does it's animations. And when done, it cuts itself off from the branch with [self removeFromSupeview];. Now some nerd a year ago told me: "Never cut yourself off from your own branch". In other words: A view should never ever remove itself from superview if it's no more referenced anywhere. I want to get it, really. WHY? Think about this: The hard way, I would do actually the exact same thing. Create an instance and hang me in as delegate, kick off the animation, and when the warning icon is done animating, it calls me back "hey man i'm done, get rid of me!" - so my delegate method is called with an pointer to that instance, and I do the exact same thing: [thatWarningIcon removeFromSuperview]; - BANG. Now I'd really love to know why this sucks. Life would be so easy.

    Read the article

  • Objective C: Using UIImage for Stroking

    - by SeongHo
    I am trying to apply a texture for my brush but i'm really having a hard time figuring how it is done. Here's the image of my output. I used an UIImage that just follows the touch on the screen but when i swipe it faster the result is on the right side "W", and on the left side that's the result when i swipe it slow. i tried using the CGContextMoveToPoint and CGContextAddLineToPoint i don't know how apply the texture. Is it possible to use UIImage for the stroke texture? Here's my code UIImage * brushImageTexture = [UIImage imageNamed:@"brushImage.png"]; [brushImagetexture drawAtPoint:CGPointMake(touchCurrentPosition.x, touchVurrentPosition.y) blendMode:blendMode alpha:1.0f];

    Read the article

  • titleForHeaderInSection is not updating Section Header information correctly

    - by Jim
    I have two tableviews where one navigates to the next. Both use more or less the same code and use the managedObjectContext and FetchedResultsController design pattern to provide the relevant data for both tables. My problem happens when I navigate from the first to the second tableview and the data has only one Section Header / Row in the tableview. The data will then not update Section Header information. It does when there is more than one row but not if there is only one row. It leaves the information from the first attempt in place. I can confirm the row data is correct so the relevant data should be being passed to the Section Header correctly but it isn't. Has anyone else come across this problem?

    Read the article

  • Why are my lines getting thicker and thicker?

    - by mystify
    I try to draw some lines with different colors. This code tries to draw two rectangles with 1px thin lines. However, the second rectangle is drawn with 2px width lines, while the first one is drawn with 1px width. - (void)addLineFrom:(CGPoint)p1 to:(CGPoint)p2 context:(CGContextRef)context { // set the current point CGContextMoveToPoint(context, p1.x, p1.y); // add a line from the current point to the wanted point CGContextAddLineToPoint(context, p2.x, p2.y); } - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGPoint from, to; // ----- draw outer black frame (left, bottom, right) ----- CGContextBeginPath(context); // set the color CGFloat lineColor[4] = {26.0f * colorFactor, 26.0f * colorFactor, 26.0f * colorFactor, 1.0f}; CGContextSetStrokeColor(context, lineColor); // left from = CGPointZero; to = CGPointMake(0.0f, rect.size.height); [self addLineFrom:from to:to context:context]; // bottom from = to; to = CGPointMake(rect.size.width, rect.size.height); [self addLineFrom:from to:to context:context]; // right from = to; to = CGPointMake(rect.size.width, 0.0f); [self addLineFrom:from to:to context:context]; CGContextStrokePath(context); CGContextClosePath(context); // ----- draw the middle light gray frame (left, bottom, right) ----- CGContextSetLineWidth(context, 1.0f); CGContextBeginPath(context); // set the color CGFloat lineColor2[4] = {94.0f * colorFactor, 94.0f * colorFactor, 95.0f * colorFactor, 1.0f}; CGContextSetStrokeColor(context, lineColor2); // left from = CGPointMake(200.0f, 1.0f); to = CGPointMake(200.0f, rect.size.height - 2.0f); [self addLineFrom:from to:to context:context]; // bottom from = to; to = CGPointMake(rect.size.width - 2.0f, rect.size.height - 2.0f); [self addLineFrom:from to:to context:context]; // right from = to; to = CGPointMake(rect.size.width - 2.0f, 1.0f); [self addLineFrom:from to:to context:context]; // top from = to; to = CGPointMake(1.0f, 1.0f); [self addLineFrom:from to:to context:context]; CGContextStrokePath(context); }

    Read the article

  • iPad --- managedObject problem when [self.tableViewSection reloadData]

    - by user345777
    Hi , I am creating a news aggregator application that fetches a xml feed every 4 minutes. After the xml is loaded, I clear everything by deleting all the objects in the database, then save the new objects back into the database. I then call [self.tableViewSection reloadData]; to reload the tableView. Thats when I get a problem. As soon as the code gets to a section where i access the new [[managedObject valueForKey:@"event_text"] description] content it fails with a : * Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x4b3f6a0 '' Now from the flow I described on top, it seems odd to me that the tableView is populated properly the next time i launch the application, with the "new" data I fetched in the previous session. So its not that data thats corrupt , but seems to me something goes wrong when I refetch the managedObject after saving new data. Also keep in mind thats this app runs fine on the iPhone, its the iPad thats is giving me this problem.

    Read the article

  • UITableView with Shake and play.

    - by avural79
    hi all i am trying to make a musical app for iphone. the app is simple. there is a couple of musical note sample (caf) files. when user taps the predefined positions on uiview(like strings). app plays note sample and add a string value to a nsmutablearray about note. played note lists displays in a table. now i want to add a shake and play mode to app. when user shake iphone, recorded notes start to play from first record to last record and loop again. also if user shake iphone harder notes will plays faster. how can i do that. any idea? thanks

    Read the article

  • Breaking One Big Graphic of MutablePaths into CAShapeLayers

    - by StackOverFlowRider
    I have a class called GraphicView that takes a Graphic object and draws it in its drawRect method. This Graphic object is basically an array of mutablePaths that comprise an icon that I want drawn. For performance and other issues, I was thinking of taking this icon that is comprised of mutablePaths, and dividing it into a bunch of CAShapeLayers. I'm wondering is this possible? Considering the points for the mutablePaths of the icon are all interwoven together (ie the icon was initially an SVG file that I converted to code), is it possible to divide different parts of the icon into CAShapeLayers, and reassemble them all together when assigning to the views layer? If so how would it be done? If I assign them as sublayers to a CALayer or CAShapeLayer, will it understand to mesh them all together?

    Read the article

  • how to dynamically recolor a CGGradientRef

    - by saintmac
    I have three CGGradientRef's that I need to be able to dynamically recolor. When I Initialise the CGGradientRef's the first time I get the expected result, but every time I attempt to change the colors nothing happens. Why? gradient is an instance variable ins a subclass of CALayer: @interface GradientLayer : CALayer { CGGradientRef gradient; //other stuff } @end Code: if (gradient != NULL) { CGGradientRelease(gradient); gradient = NULL; } RGBA color[360]; //set up array CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); gradient = CGGradientCreateWithColorComponents ( rgb, color, NULL, sizeof (color) / sizeof (color[0]) ); CGColorSpaceRelease(rgb); [self setNeedsDisplay];

    Read the article

  • managedObjectContext question...

    - by treasure
    Hello, I have an app which is a UITabBarController, I have defined two subviews Both tabs have their Class attribute in the Identity Inspector set to UINavigationController. Now i have managed to get this far with my coding after VERY LONG trials. - (void)viewDidLoad { [super viewDidLoad]; myAppDelegate *appDelegate = (myAppDelegate *)[[UIApplication sharedApplication] delegate]; self.managedObjectContext = appDelegate.managedObjectContext; { NSError *error = nil; NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; [fetchRequest setEntity:[NSEntityDescription entityForName:@"User" inManagedObjectContext:self.managedObjectContext]]; NSArray *fetchedItems = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error]; NSEntityDescription *entityDesc = [NSEntityDescription entityForName:@"User" inManagedObjectContext:self.managedObjectContext]; // replace the old data with new. this DOESNT WORK if (fetchedItems.count > 0) { Usr *newUsr; for (newUsr in fetchedItems) { if ([newUsr.name isEqualToString:@"Line One"]) { newUsr.uName = @"Line One (new)"; } } } //add a new default data. THIS ADDS DATA TO MY TABLEVIEW BUT IT DOESNT SAVE THEM TO THE SQLITE User *addedDefaultdata = nil; addedDefaultdata = [[User alloc] initWithEntity:entityDesc insertIntoManagedObjectContext:self.managedObjectContext]; addedDefaultdata.name = @"Added new 1"; [addedDefaultdata release]; } NSError *error = nil; if (![[self fetchedResultsController] performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } } and my appdelegate looks like this: - (void)applicationDidFinishLaunching:(UIApplication *)application { [application setStatusBarStyle:UIStatusBarStyleBlackOpaque]; [window addSubview:navigationController.view]; [window makeKeyAndVisible]; } now I cannot quire the "User" at all! although i get no errors or warnings! Any suggestions would be much appreciated! Thanks

    Read the article

  • CoreData Model Objects for API

    - by theiOSguy
    I am using CoreData in my application. I want to abstract out all the CoreData related stuff as an API so that the consume can use the API instead of directly using CoreData and its generated model objects. CoreData generates the managed objects model as following @interface Person : NSManagedObject @end I want to define my API for example MyAPI and it has a function called as createPerson:(Person*)p; So the consumer of this createPerson API needs to create a Person data object (like POJO in java world) and invoke this API. But I cannot create Person object using Person *p = [Person alloc] init] because the designated initializer for this Person model created by CoreData does not allow this type of creation. So should I define corresponding user facing data object may be PersonDO and this API should take that instead to carry the data into the API implementation? Is my approach right? Any expert advise if design the API this way is a good design pattern?

    Read the article

  • How to rotate UIViews?

    - by user717452
    The Twitter app is a tab bar app on the iPhone. Nothing in any of the tabs will rotate, yet, when you click on a link from a tweet, the view controller that is pushed on top of it IS allowed to rotate. The only rotations I have ever doe is from tilting the device, landscape or portrait, but I don't understand how to use 2d transformations and animations to rotate views. How do you rotate any view with that's a subclass of UIView?

    Read the article

  • CADisplayLink stops updating when UIScrollView scrolled

    - by Tricky
    Title is quite self explanatory, but I have some animation being done in a loop triggered by CADisplayLink. However, as soon as I scroll a UIScrollView I have added to my view hierarchy, the animation stops immediately, only to return again when scrolling has completely stopped and come to a standstill.... Anyway to cancel this behaviour?

    Read the article

  • Should repeated use of the camera crash an app?

    - by Sam
    I have an app that builds a slideshow from user images. They can grab from their library or take a picture. I have found that repeated use of grabbing an image from the library is fine. But repeated use of taking a picture causes erratic behavior. I have been getting crashes but mostly what happens seems to be a reloading of the view after "didFinishPickingMediaWithInfo", which messes things up. I have no leaks and it seems to be releasing properly after each picture is taken. I am resizing the image and saving it in a data base. Is anyone else running into this situation? Was the camera not designed to be called this often?

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >