In one of the WWDC15 session videos, it made mention of Swift as a POP language.In Swift 2.0 there the notion of using extensions to entend types(class, struct enum).Here's the situation.I have a hierachy of classes with one superclass.That class has an init() method that subclass callsSince it's a superclass, I do not want it being instantiated.If I can be directed to some code examples or even a discussion on the subject, that would be great.Thanks!
Search results for
Popping Sound
19,348 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Now, this is weird. I haven't been able to go 1/2 a day with either my iPhone 6 on iOS 9 or my Apple Watch on watchOS 2 since I upgraded. Today, out of the clear blue, I've gone over 1/2 a day on both and have exactly 78% battery remaining on both devices. Could it be that Apple doesn't collect data from our beta devices on Sunday? I know it sounds crazy, but that's all that I can think of?
Topic:
App & System Services
SubTopic:
Core OS
Tags:
So was able to get some results. Using the following code from above:if let audioURL = NSBundle.mainBundle().URLForResource(Audio/Beep5, withExtension: caf) { let asset = WKAudioFileAsset(URL: audioURL) let playerItem = WKAudioFilePlayerItem(asset: asset) let player = WKAudioFilePlayer(playerItem: playerItem) switch player.status { case WKAudioFilePlayerStatus.ReadyToPlay: player.play() case WKAudioFilePlayerStatus.Failed: print(player.error) case WKAudioFilePlayerStatus.Unknown: print(unknown) player.play() } }BUT, it doesn't work on the simulator and on the device itself it does require the watch be paired with a bluetooth speaker (which I think defeats the purpose). Not only that, it doesn't work 100% either. I have an app with about 20 different sounds and maybe one or two play correctly about 20% of the time. The reason I can hear hissing on the speaker but no sounds. All my files are mp3, and I haven't tried any other format. But might write another test app to try it out.I th
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I installed ios 9 beta 1 from last week. I always take photos / videos by Apple's Camera app.Unfortunately, three videos were taken in normal way. From the thumbnail preview screen, those video thumbnails were showing with white background. After i clicked into it, video can be played but background is whole BLACK with sound only.Does anyone got this problem too?(I pasted this information into bug report and hope APPLE development team to fix it at least in next beta version)Thanks a lot.p.s. I can provide the capture screen but seems that here cannot be posted any pic.
So maybe I don't get what you are saying with your first example.struct MergedCollection<T where T : CollectionType> { var data : [T] init(collections: [T]) { data = collections } } let items1 = [1, 2, 3] let items2 = [4, 5, 6] let c = MergedCollection<[Int]>(collections: [items1, items2])Isn't this what you are tasking for? The ability to store multiple collections that hold a type of T that implements CollectionType?Also, if you need a library to accept any type of book, then right, the protocol cannot be generic because the type information is important. Instead, do something like this:struct ContentManager<T> { } protocol AnyBook { var identifier: String { get } init(identifier: String) } protocol Book : AnyBook { var contentManager: ContentManager<Self> { get } } struct LocalBook : Book { let identifier: String let contentManager = ContentManager<LocalBook>() init(identifier: String) { self.identifier = identifier } } struct RemoteBook : Book { let identifier: String let con
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Thanks for your reply, but if that's the issue (and it sounds like you have some experience to support your reasoning), why does it work ok in iOS8? Did older versions of iOS use an older version of TLS when making calls over SSL?
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Exactly, I did find some sample code which plays an audio file, however this is by no means a solution as it has to open the media player in order to do so. I need a background audio player that doesn't interfere with the interface. NSDictionary *options = @{ WKMediaPlayerControllerOptionsAutoplayKey : @YES }; NSURL* falcon = [[NSBundle mainBundle] URLForResource:@falcon withExtension:@mp3]; [self presentMediaPlayerControllerWithURL:falcon options:options completion:^(BOOL didPlayToEnd, NSTimeInterval endTime, NSError * __nullable error) { if (!didPlayToEnd) { NSLog(@The player did not play all the way to the end. The player only played until time - %.2f., endTime); } if (error) { NSLog(@There was an error with playback: %@., error); } }];
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Yeah on their transistion page I found it odd how they are giving example in Cocco instead of Swift which they are heavily promoting. Hopefully we'll figure out how to play sounds on the speaker soon.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Hello,I made a custom keyboard. Everything works fine except of two things:(I am using Xcode 7 and am testing the app on my iPhone 5.)1. When I turn the device from portrait to landscape or the other way roundsometimes it does not change the formation and crashs.I wonder why this happens only sometimes and not every time the first time.2. When my phone is not connected to Xcode it does not work likewhen it is connected to the computer.It crashs when I was not in the app for around 5-10 seconds and I openit again then.It does not pop up again and a restart is necessary.
Ok, thanks guys. Sounds like the consensus is that we just have to turn on the setting, and then Apple will do the rest, and that there's no other code changes or configuration required.Thanks
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Not as good as it sounds, reboot doesn't fix it and 3G and LTE are only functioning very intermittently. Is anyone else experiencing this?
My Taptic and sound are dead both!Hard to receive notifications like this to the watch.
Topic:
App & System Services
SubTopic:
Core OS
Tags:
Power management as a feature is typically removed from early betas, so this sounds normal.◅▻
Topic:
App & System Services
SubTopic:
Core OS
Tags:
When embedding the AVPlayerViewController in a container view in iOS9 beta 1 and start playing an audio track, I get this with latest beta. Anyone else able to reproduce?:2015-06-15 22:11:56.266 SampleRadio[860:521233] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)( <NSLayoutConstraint:0x15cd8eb20 UIView:0x15cf58fc0.centerY == AVPictureInPictureIndicatorView:0x15cf58a10.centerY + 10>, <NSLayoutConstraint:0x15cd8ed50 V:[UIView:0x15cf58fc0]-(>=10)-| (Names: '|':AVPictureInPictureIndicatorView:0x15cf58a10 )>, <NSLayoutConstraint:0x15cd8efa0 V:|-(0)-[UIImageView:0x
Does the AVFoundation Framework allow an app to have read access of the audio output (e.g. music) that is generated by a different app? If not, can I use the microphone to simultaneously record the audio output of the speaker, and then analyze the microphone recording in real time?I've read the documentation for Shared Audio Session of AVAudioSession, and I searched for inter-app audio information, but I still can't determine if this is possible.I essentially want to write an app that changes screen colors/patterns based on what music is being played by other apps.Thanks!