Help with removing event from calendar

Hello everyone I'm adding a simple feature in my xcode ios app that has a UISwitch. When the UISwitch is on an event is created (this part works fine). But when I turn the UISwitch off I cannot find a way to remove the event. If I use code in the second if statement to remove the event, the event identifier is undeclared because it is in a separate if statement. Can someone please tell me what code I need to remove the event.
Code:
- (IBAction)switchon:(id)sender {
    if (switchoutlet.on) {
        EKEventStore *store = [[EKEventStore alloc] init];
        [store requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
            if (!granted) { return; }
            EKEvent *event = [EKEvent eventWithEventStore:store];
            event.title = @"Event A";
            event.startDate = [NSDate dateWithTimeIntervalSince1970:1406948400]; //today
            event.endDate = [event.startDate dateByAddingTimeInterval:60*60];  //set 1 hour meeting
            EKAlarm *alarm = [EKAlarm alarmWithRelativeOffset:-60*10];
            event.alarms = [NSArray arrayWithObject:alarm];
            [event setCalendar:[store defaultCalendarForNewEvents]];
            NSError *err = nil;
            [store saveEvent:event span:EKSpanThisEvent commit:YES error:&err];
            NSString *savedEventId = event.eventIdentifier;  //this is so you can access this event later
    if (!switchoutlet.on) {
        //remove event

Ben Pleysier wrote:
Be patient!
For about 7 years!!!!!!!!!!!
Once something is on the Internet, it remains so.  That is why people (mainly children) are always advised not to post anything that they may come to regret in a few years time when you are looking for jobs and your potential employer does a background search on you.

Similar Messages

  • Help with removing text from background

    Hi,
    I'm pretty new to this, but I'm trying to figure out how to remove text from a background.  My problem is that when I use tools to grab the text, it only selects part of it because the pixels of the text are actually different colors as it blends in with the backgorund.  Does anyone have a quick idea how to do this?
    Thanks
    <link removed>

    Don't you like to see people's websites/projects/works in forums?  Seems to me that you get to know people and what they are into when they post their work.  Anyways in the spirit of you helping me, here is the picture.
    I'm trying to remove the letters from the background.  Everything about the letters including the shadows.
    Thanks

  • Help with removing images from Google image searches with Dreamweaver

    I made a sight in dreamweaver, and need to remove a page from that website with some old images. So I removed the link and moved the webpage from the root folder. And If I go into dreamweaver the page is blank showing the image has been removed.
    But the images are still showing up in google image searches even though I removed them in dreamweaver and re-uploaded the sight successfully. How do I remove them form the internet completely so they no longer show up in google images??

    Ben Pleysier wrote:
    Be patient!
    For about 7 years!!!!!!!!!!!
    Once something is on the Internet, it remains so.  That is why people (mainly children) are always advised not to post anything that they may come to regret in a few years time when you are looking for jobs and your potential employer does a background search on you.

  • Need help with custom event from Main class to an unrelated class.

    Hey guys,
    I'm new to Flash and not great with OOP.  I've made it pretty far with google and lurking, but I've been pulling my hair out on this problem for a day and everything I try throws an error or simply doesn't hit the listener.
    I'm trying to get my Main class to send a custom event to an unrelated class called BigIcon.  The rest of the code works fine, it's just the addEventListener and dispatchEvent that isn't working.
    I've put in the relevant code in below.  Let me know if anything else is needed to troubleshoot.  Thank you!
    Main.as
    package
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        public class Main extends MovieClip
            var iconLayer_mc:MovieClip = new MovieClip();
            public function Main()
                Spin_btn.addEventListener(MouseEvent.CLICK,fl_MouseClickHandler);
                addChildAt(iconLayer_mc,0);
                placeIcons();
            function placeIcons():void
                var i:int;
                var j:int;
                for (i = 0; i < 4; i++)
                    for (j = 0; j < 5; j++)
                        //iconString_array has the names of illustrator objects that have been converted to MovieClips and are in the library.
                        var placedIcon_mc:BigIcon = new BigIcon(iconString_array[i][j],i,j);
                        iconLayer_mc.addChild(placedIcon_mc);
            function fl_MouseClickHandler(event:MouseEvent):void
                dispatchEvent(new Event("twitchupEvent",true));
    BigIcon.as
    package
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.utils.getDefinitionByName;
        public class BigIcon extends MovieClip
            private var iconImage_str:String;
            private var iconRow_int:int;
            private var iconColumn_int:int;
            public function BigIcon(iconImage_arg:String, iconRow_arg:int, iconColumn_arg:int)
                iconImage_str = iconImage_arg;
                iconRow_int = iconRow_arg;
                iconColumn_int = iconColumn_arg;
                this.addEventListener(Event.ADDED_TO_STAGE, Setup);
            function Setup(e:Event)
                this.y = iconRow_int;
                this.x = iconColumn_int;
                var ClassReference:Class = getDefinitionByName(iconImage_str) as Class;
                var thisIcon_mc:MovieClip = new ClassReference;
                this.addChild(thisIcon_mc);
                addEventListener("twitchupEvent", twitchUp);
            function twitchUp(e:Event)
                this.y +=  10;

    Ned Murphy wrote:
    You should be getting an error for the Main.as class due to missing a line to import the Event class...
    import flash.events.Event;
    My apologies, I should attempt to compile my example code before I ask for help...
    Alright, this compiles, gives me no errors, shows my 'book' and 'flowers' icons perfectly when ran, and prints 'addEventListener' to the output window as expected.  I get no errors when I press the button, 'dispatchEvent' is output (good), but the 'twitchUp' function is never called and 'EventTriggered' is never output. 
    How do I get the 'twitchUp' event to trigger?
    Main.as
    package
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        import flash.events.*;
        public class Main extends MovieClip
            var iconLayer_mc:MovieClip = new MovieClip();
            var iconString_array:Array = new Array(2);
            public function Main()
                Spin_btn.addEventListener(MouseEvent.CLICK,fl_MouseClickHandler);
                addChildAt(iconLayer_mc,0);
                buildStringArray();
                placeIcons();
            function buildStringArray():void
                var i:int;
                var j:int;
                for (i = 0; i < 2; i++)
                    iconString_array[i] = new Array(3);
                    for (j = 0; j < 3; j++)
                        if (Math.random() > .5)
                            //'flowers' is the name of an illustrator object that has been converted to a MovieClip and is in the library
                            iconString_array[i][j] = "flowers";
                        else
                            //'book' is the name of an illustrator object that has been converted to a MovieClip and is in the library
                            iconString_array[i][j] = "book";
            function placeIcons():void
                var i:int;
                var j:int;
                for (i = 0; i < 2; i++)
                    for (j = 0; j < 3; j++)
                        //iconString_array has the names of illustrator objects that have been converted to MovieClips and are in the library.
                        var placedIcon_mc:BigIcon = new BigIcon(iconString_array[i][j],i*50,j*50);
                        iconLayer_mc.addChild(placedIcon_mc);
            function fl_MouseClickHandler(event:MouseEvent):void
                dispatchEvent(new Event("twitchupEvent",true));
                trace("dispatchEvent");
    BigIcon.as
    package
        import flash.display.MovieClip;
        import flash.events.*;
        import flash.utils.getDefinitionByName;
        public class BigIcon extends MovieClip
            private var iconImage_str:String;
            private var iconRow_int:int;
            private var iconColumn_int:int;
            public function BigIcon(iconImage_arg:String, iconRow_arg:int, iconColumn_arg:int)
                iconImage_str = iconImage_arg;
                iconRow_int = iconRow_arg;
                iconColumn_int = iconColumn_arg;
                this.addEventListener(Event.ADDED_TO_STAGE, Setup);
            function Setup(e:Event)
                this.y = iconRow_int;
                this.x = iconColumn_int;
                var ClassReference:Class = getDefinitionByName(iconImage_str) as Class;
                var thisIcon_mc:MovieClip = new ClassReference;
                this.addChild(thisIcon_mc);
                addEventListener("twitchupEvent", twitchUp);
                trace("addEventListener");
            function twitchUp(e:Event)
                this.y +=  10;
                trace("EventTriggered");
    Output:
    [SWF] Untitled-1.swf - 40457 bytes after decompression
    addEventListener
    addEventListener
    addEventListener
    addEventListener
    addEventListener
    addEventListener
    dispatchEvent
    [UnloadSWF] Untitled-1.swf
    Test Movie terminated.

  • Problem with remove task from schedule in PWA

    In our environment problem with remove task from schedule by PWA.
    Problem is only when I want to remove few task in the same time, but the operation one by one is correct.
    In my opinion problem is with calculation schedule after remove tasks, column ID include wrong value it means that Number ID does not generate in the correct order same of numer
    disappear. Click Calculate button on ribbon causes problem with finshed operation and save project.
    Problem occurs only machine with IE 11.0 browser without compability mode, on other machine for example on the same project with IE 8,9,10 everything is correct.
    Problem appeared recently, earlier everything was OK.
    Txn, Dariusz Moczyński

    Hi Darius,
    I'm a bit confused. You are now talking about 2 issues.
    For the first one, you cannot edit anymore tasks in PWA, with any browser versions? Is it happenonog for any users on any projects? Try the following solutions publish the project from Project Pro and see if it helps. Press CTRL F5 to delete IE cache. Ensure
    that your PWA URL is added to the trusted site and/or compatibility sites. Check for the ULS logs or javascript errors.
    For the second issue, please refer to my previous reply, this obviously cannot be considered as a bug since it is happening with a non supported browser version and working properly on supported versions of IE.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • Having trouble deleting event from Calendar

    How do I delete an event from Calendar on iPhone 4s. Syncs with computer but does not delete event. When I follow instructions in user guide, can't do

    connect your ipod to itunes and go onto your ipod options on itunes. go to photos and reselect the album you want to transfer onto your ipod.

  • How can I remove events from my iPhone. I want to delete all the events from my iPhone.

    how can I remove Events from my Photo in iPhone

    Connect to computer iTunes and uncheck under Photos > Events then do a sync.

  • Unable to remove delegates from calendar:

    While removing delegates from calendar error is generated "The Delegates settings were not saved correctly.  Cannot activate send-on-behalf-of list.You do not have sufficient permission to perform this operation on this object."
    I Referred  and re-added AD permissions & also made desired registry settings as per below solutions in links but no luck! Please suggest.
    http://support.microsoft.com/kb/2593557
     http://community.spiceworks.com/how_to/show/41829-getting-error-after-adding-new-delegates-the-delegates-settings-were-not-saved-correctly-cannot-activate-send-on-behalf-of-list-you-do-not-have-sufficient-privileges-to-perform-this-operation-on-this-object
    Aditya Mediratta

    I found a fix for this. The mentioned user that was added as delegate
    missed send on behalf of permission on mailbox, Re-adding permissions and then removing this from delegate
    got this fixed. Thanks All!
    Aditya Mediratta

  • How I can delete event from calendar (iOS7)??

    How I can delete an event from calendar (iOS7)?? I can't find any icons, any gesture for that!!!

    I've never used the calendar app until I read this, so I created a test event and then spent about 15 minutes trying to figure out how to delete it, but I finally figured it out!  Here's how to do it:
    1) Tap the event to bring up the info panel about it.
    2) Tap "Edit".
    3) A long panel will appear, letting you set all sorts of info about the event, but there doesn't appear to be any way to delete it, but...
    4) Pull up on that long panel, and way down at the bottom is a red "Delete Event" button.  Tap it and confirm the deletion in the message box that appears, and the event it gone!
    Ken

  • Help with removing my account name from the search...

    Dear Sirs:
    Due to a breach security in my P.I., I need to have my skype name to be removed from the search directory.  Please help me.
    Thanks,
    GP

    Hi, GP2013, and welcome to the Community,
    Please take a look at this information: 'Can I delete my Skype account?' and then contact customer service for assistance.  We here in the Community do not have access to Skype account details.
    Here is a slightly annotated version of the instruction to file your request with Skype Customer Service, and to receive a reply via e-mail.  Hope this serves as a useful road map!
    Regards,
     Elaine
    How can I contact Skype Customer Service?
    Skype offers help and support through:
    The Skype Support website
    The Skype Community
    The Heartbeat blog
    Skype blogs
    Email and Live chat (for eligible customers)
    To get help with the issue you’re experiencing:
    Go to the Support request page.  You will be asked to sign on to the Skype website at this step.
    Select the topic you need help with and the problem you’re experiencing. ... or the closest topic which matches your enquiry.  Some information that might help with your problem is displayed.  These are the FAQ articles pulled from the library for your review.
    If you still feel that the information doesn’t help, scroll down to the bottom of the website page and click the Continue support request button at the bottom of the screen. 
    Select your contact method. (We recommend that you check our Skype Community first. No need to circle back here, as the Community is where you started!)
    If you chose email, enter your details, describe your problem, and then click Send support request. We'll get back to you as soon as we can.
    We don’t currently provide telephone support.
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • How can I remove events from iCal?

    I send myself calendar invites (repeating weekly meeting invites)from Outlook from my office workstation, to my personal email address that I monitor on my iPhone.  These are typically .ics files.  Once I accept that event on my iPhone, then that event shows up on iCal.
    But if I cancel that event on my workstation, I get the cancellation email on iPhone, but the event DOES NOT get removed from iCal.
    How can I remove those events from the iPhone iCal app?
    Thanks!
    Vince in Leesburg

    thisone - Thanks for your response, but unlike most events, this one does not have an edit button before the Event Details screen. In the top right hand corner next to the words 'Event Details' there is just an empty space.
    This event is extremely pesky and I have repeatedly synced my phone in attempt to remove it. It was an invitation I accepted for a recurring weekly event, which was sent to an email address for my old job. That email address is no longer active and no longer existing on my phone, but this event continues to show up on my calendar every single Tuesday.
    Help?

  • Removing events from imovie

    Im having trouble removing the events from iMovie. It says "Operation cannot be completed. Library must contain atleast one event". OMG this is so confusing. I just want to remove this so as to clear some space. Would be grateful if anyone helped.

    As you discovered, you cannot move a finished movie back to your camera for playback.
    For playback on an Apple TV, shore using the LARGE preset, and you will get a 960x540 file that looks really good on a high definition TV if it has upscaling circuitry, because this is a simple upscale to 1920x1080.
    If you want to burn a movie in full 1920x1080, there are several options.
    1) You can create it using iMovie's "Export using Quicktime" feature and watch it on your Mac. Use a 24" iMac for best results. It will use the entire screen.
    2) Same as #1 except you can watch it on a Sony Playstation 3.
    2) You can get Toast 9 with BluRay plug in and burn up 20 minutes or so of movies to a standard DVD. It might be more with a dual layer DVD but I have not tried it. Create your movie and export it using Quicktime in AIC or h.264 and the burn in Toast. Most BluRay players will read the DVD.
    3) If you have a BluRay burner, you can use Toast 9 to burn multiple movies up to theatrical length and maybe more.
    See my post here for some details:
    http://discussions.apple.com/thread.jspa?messageID=7022027&#7022027

  • How to get all events from calendar using calcalendar store framework.

    Hello,
    I have two problems with calcalendar store framework programming.
    1. I need all the event which are present in iCal calendar.Event may be present in year 2025 or 2050. and if the event is recurring then i need only one event.
    2. if the event is recurring then i need only one event within the calendar event predicates (start date and end date). I am not suppose to give the occurrence date for event.
    How can I implement this with CalCalendar store framework.
    Thanks And Regards,
    xmax.

    Hi,
    Per my knowledge, there is not a method to get all the recurring events using CAML query in one request.
    Here is a thread with the similar question for your reference:
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/eed6be6d-c9ff-4d01-80de-8a4b67d3d7a5/use-caml-to-get-all-recurring-events-from-a-calendar
    We can get all the calendar list events at first, then filter all the recurring event from the result set.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Help with removing person in photo

    I'm fairly new to photoshop and am familiar with removing objects/content aware.In the link im trying to remove the person with the hat on and fix whats left over to make it look like water is there.Mostly though having trouble removing the lower part of the guy between his arms and keeping the water and plants there.
    http://i.imgur.com/Ol4NQ2J.jpg
    So my question would be what is the cleanest/pro way of removing the person and keeping it looking like the water and weeds are still there?thanks for the help.

    thank you Cadogan, I am glad you like the results. Here are a few images that might help:
    this was the plane I made inside vanishing point, the idea is to ignore everything else and just try to focus at the river perspective. If your plane turns red or yellow you have an invalid plane that vanishing point can't really understand. play around with settings until you get a blue plane. once the plane looks good, hit ok to exit vanishing point.
    create a new layer and go back to vanishing point, clone stamp some water from the top right area, until you get something like this:
    as you can see I am overlapping his arms a lot, and cleaning up unwanted parts later by loading up the mask. play around with Levels to lighten up the water a bit and it should blend pretty well.
    finally, add a new layer to clone stamp the weeds, these were the general areas I used:
    please post again if you have any question, have fun!

  • Help with removing unwanted songs......

    From what I've understood on other discussion boards, if the little check isn't marked next to a song in your iTunes library, it won't be updated to your iPod. But that doesn't seem to be true for my iPod. It seems like no matter what songs I un-check in hopes of never hearing on my iPod they always end up in my playlist.
    I'm sharing my iTunes with my aunt, who has a new shuffle (I just got an 80g) so she ended up with all my songs, and I have all my songs, AND her songs. We have very different tastes in music, so we're both curious as to how to change the playlists on our new toys.
    Is there any other way to remove songs from your iPod? (i chose to manually manage music/videos, but they're still on my pod.....)
    Any help is greatly appriciated!!!

    The updating checked items option doesn't work if you have the iPod set to manual.
    See here for how to load songs onto a shuffle.
    http://docs.info.apple.com/article.html?path=iTunesWin/7.0/en/799.html
    Seems like you need to create playlists for your Aunt's music and load only those to the shuffle.
    For your iPod, if you have the iPod set to manually manage your songs, and you want to delete the song from the iPod only, then select the iPod in the source list of iTunes, or click on the "music" option underneath it to show all your songs. Highlight the song(s) you no longer want on the iPod, right click and select "clear", or use the edit/delete menu in iTunes.
    This method only deletes the songs from the iPod, so if you no longer want the song in iTunes also, you'll need to delete it from there separately using the method above.

Maybe you are looking for