Search Results

Search found 236 results on 10 pages for 'mystify'.

Page 5/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • How to intercept touch events globally?

    - by mystify
    I have an view which is sometimes covered by some other views. However, if the user slides the finger across the screen, I want to slide that underlying view across the screen, too. I could start making custom views for all those covering subviews and forward all kinds of touch events, but that's somewhat cumbersome. Maybe there's some kind of notification or another way that a UIView or UIControl subclass can be aware of touch events happening right now, no matter where they are. In short: I need an UIView subclass or UIControl subclass which knows about any touch events happening on the entire screen. Or at least if tht's not possible, knowing about any touch events happening above itself in the same underlying superview. Another description: There are 20 views, all reside inside the same superview. The first view is covered by 19 others. But if the user slides across the screen, that first view must slide too, so it must be aware of touch events. Is there any better solution that making all 19 views forward touch events? (yes, all 19 views respond to touch events in this example)

    Read the article

  • How to programmatically deactivate the AirPort?

    - by mystify
    I want to make a small utility to programmatically deactivate the AirPort of my mac. I have networking problems which couldnt be resolved by expensive experts. I need to deactivate and reactivate the mac AirPort once every half hour. So a little utility which does that automatically would be great. I think I wouldn't need an UI for this either. Just the most simple possible kind of application to automatically stop and start the AirPort. Maybe even apple automator code?

    Read the article

  • What things must I know about OpenAL memory management?

    - by mystify
    I am playing sound with OpenAL, and it seems to increase memory footprint dramatically for every little sound I play. It seems that OpenAL never frees memory itself and that playing a Source causes memory footprint to grow. I couldn't find any good resources about OpenAL memory management, but I bet I must do a lot of stuff myself. Maybe someone knows a ressource for that?

    Read the article

  • How to make a table view which is not the full width of the screen?

    - by mystify
    For some strange reason, UITableView resizes my cells to 320 width no matter how I set the frame for the UITableView object. Even if I go in later and resize the cell back to 250, UITableView seems to resize it again to 320 some time. Is there some property or method that must be set / called additionally to get that right? However, I can add my contents in a way that it looks like 250 width, but my whole layouting code is a big mess since I can't rely on the cell frame width which is "wrong". Also it seems like a big waste of memory since the bitmaps in the layer trees are nonsenseless 320 width instead of 250, even though the frame of the UITableView is not 320 width.

    Read the article

  • How to animate the frame of an layer with CABasicAnimation?

    - by mystify
    I guess I have to convert the CGRect into an object to pass it to fromValue? This is how I try it, but it doesn't work: CABasicAnimation *frameAnimation = [CABasicAnimation animationWithKeyPath:@"frame"]; frameAnimation.duration = 2.5; frameAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; frameAnimation.fromValue = [NSValue valueWithCGRect:myLayer.frame]; frameAnimation.toValue = [NSValue valueWithCGRect:theNewFrameRect]; [myLayer addAnimation:frameAnimation forKey:@"MLC"];

    Read the article

  • What does this error mean when using OpenAL in the iPhone Simulator?

    - by mystify
    I'm getting this in the console, when creating my OpenAL Sources and Buffers: Cannot find executable for CFBundle/CFPlugIn 0xf530d0 </Library/Audio/Plug-Ins/HAL/Hear.plugin> (not loaded) 2010-05-05 17:11:13.934 Testproj[43173:207] Cannot find function pointer HearCFPlugInFactory for factory 5268FAAB-0147-4272-93FD-4D60A2433C1C in CFBundle/CFPlugIn 0xf430d0 </Library/Audio/Plug-Ins/HAL/Hear.plugin> (not loaded) However, the sounds play nicely. I think HAL is not available on the iPhone, it's just on Mac OS X, right? Do you guys also get that error in the simulator when using OpenAL?

    Read the article

  • How to draw shadows that don't suck?

    - by mystify
    A CAShapeLayer uses a CGPathRef to draw it's stuff. So I have a star path, and I want a smooth drop shadow with a radius of about 15 units. Probably there is some nice functionality in some new iPhone OS versions, but I need to do it myself for a old aged version of 3.0 (which most people still use). I tried to do some REALLY nasty stuff: I created a for-loop and sequentially created like 15 of those paths, transform-scaling them step by step to become bigger. Then assigning them to a new created CAShapeLayer and decreasing it's alpha a little bit on every iteration. Not only that this scaling is mathematically incorrect and sucks (it should happen relative to the outline!), the shadow is not rounded and looks really ugly. That's why nice soft shadows have a radius. The tips of a star shouldn't appear totally sharp after a shadow size of 15 units. They should be soft like cream. But in my ugly solution they're just as s harp as the star itself, since all I do is scale the star 15 times and decrease it's alpha 15 times. Ugly. I wonder how the big guys do it? If you had an arbitrary path, and that path must throw a shadow, how does the algorithm to do that work? Probably the path would have to be expanded like 30 times, point-by-point relative to the tangent of the outline away from the filled part, and just by 0.5 units to have a nice blending. Before I re-invent the wheel, maybe someone has a handy example or link?

    Read the article

  • What's a good place to unregister an observer from the notification center?

    - by mystify
    When I add an observer to the default notification center, where would I unregister that? Example: I have a UIView subclass which lives inside a view controller. That subclass is an observer for the FooBarNotification. If this notification is posted, that view will get it. But now, the view controller decides to throw away the view. Is the best place the -dealloc method of the view itself? Are there any rules like memory management rules? For example: Must I unregister an observer where I registered it? i.e. the view registers itself in it's init method, so it should unregister itself in it's -dealloc method? (not talking about push notifications, but NSNotificationCenter)

    Read the article

  • How to calculate a point with an given center, angle and radius?

    - by mystify
    In this SO question, someone asked for calculating an angle from three points. I need to do the opposite thing. I want to draw a clock, and I have tiny tick images. An art dude made 60 of them, each with an individual and accurate shadow. So there are 60 distinct images at 10x10 points in size, already correctly rotated in the center of that square. So every 6 degrees one tick image has to be placed. I would just need to calculate the x/y coordinate based on a center point, an radius and an angle. So I have: an center point an radius an angle Is there an easy way to calculate the x/y coordinate with this? Maybe cocoa-touch already has a useful function or method for this?

    Read the article

  • Can two managed object context share one single persistent store coordinator?

    - by mystify
    Example: I have one persistent store coordinator which uses one single persistent store. Now there are two managed object contexts, and both want to use the same persistent store. Could both simply use the same persistent store coordinator, or would I have to create two instances of NSPersistentStoreCoordinator? And if I had to, then: Would I also have to create two NSPersistentStore instances?

    Read the article

  • How to calculate the audio file duration in core audio?

    - by mystify
    I have this info variable which is of this type: struct AudioStreamBasicDescription { Float64 mSampleRate; UInt32 mFormatID; UInt32 mFormatFlags; UInt32 mBytesPerPacket; UInt32 mFramesPerPacket; UInt32 mBytesPerFrame; UInt32 mChannelsPerFrame; UInt32 mBitsPerChannel; UInt32 mReserved; }; How could I calculate the total duration of the audio file, in seconds?

    Read the article

  • How to assign a value to an pointer-pointer passed in call by reference?

    - by mystify
    I want to achieve something similar to what these guys do here: - (NSUInteger)countForFetchRequest:(NSFetchRequest *)request error:(NSError **)error like you can see, you pass an NSError pointer and that nice method will assign a real NSError object to your pointer in case there is an error. So the cool thing about this is, that the method returns an NSUInteger but can ALSO return an NSError, without having to mess around with ugly and fat arrays or dictionaries. So how could I assign an object to the passed-in error pointer?

    Read the article

  • How does undo/redo basically work on iPhone OS?

    - by mystify
    My app doesn't use Core Data yet. Is it true that I must use Core Data for undo/redo? And: How does the user do the undo/redo? I've never seen it in action, and never ever used it. Don't know how I should do it if I wanted to. There's no undo/redo button anywhere. Yet they say it has undo/redo. So how does the user trigger this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >