MosheBerman / MBCalendarKit

An open source calendar framework for iOS, with support for customization, IBDesignable, Autolayout, and more.
Other
560 stars 120 forks source link

Trouble Linking #59

Closed asifhabib closed 9 years ago

asifhabib commented 10 years ago

Can anyone help me! screen shot 2014-10-02 at 6 47 08 pm

MosheBerman commented 10 years ago

Have you linked against QuartzCore.framework?

asifhabib commented 10 years ago

Yes! I have connected all the libraries written in documents.

MosheBerman commented 10 years ago

Hrm... I wonder if there's an MBCalendarKit file that hasn't made it into your project for some reason. Compare your project against the demo project, and see if you've got everything.

Also, feel free to post a screenshot of the MBCalendarKit entries in your project, as well as your linked frameworks, and I'll try to help out.

turbocms commented 10 years ago

Hello, I'm also have a Linking error but its very different than the other one. As you can see, I do have all the frameworks and I did compare all my project files agains the demo project and they all seem to be there. (I copied the MBCalendarKit into my project, I imported the frameworks and I tried to run the program and that is when I got this error) I have the latest Xcode 6 - Version 6.0.1 (6A317). I would greatly appreciate any help. Thanks.

(when I remove the Calendar Kit folder from my project, my program works and compiles as usual)

screen shot 2014-10-07 at 11 19 36 pm

sanledi-buli commented 9 years ago

Hello, same with me, I get the problem when I tried run the demo project. screen shot 2014-10-10 at 10 11 57 am

MosheBerman commented 9 years ago

@turbocms You're including too much in your project. Only include the contents of CalendarKit, not MBCalendarKit (which is the parent folder.)

@sanledi-buli Try linking against QuartzCore and/or CoreGraphics. It seems like you're just missing a graphics library.

turbocms commented 9 years ago

Thank you very much for your help @MosheBerman. I was able to make it work per your suggestion.

I read that I cannot embed your calendar in a NavigationViewController since its already using a NavigationBar. My next challenge is to see if I can somehow embed it in my current project. I am using a Tab bar on my project to call a couple of other NavigationViewControllers so I will try to add your calendar as one of my Tab bar items. I am fairly new to app development (even though I do have 15+ years as a programmer in other mainframe languages). I am familiar with the storyboards but not with the xib files which seems to be what you are using (or maybe not, lol... I'm still trying to figure it out) but I will look up how to use xib files so that I can hopefully add your calendar to my Tab bar project because when I click the Tab item that displays your calendar, I loose my Tab bar. Thanks again.

MosheBerman commented 9 years ago

@turbocms That's correct, MBCalendarKit uses a UINavigationController for displaying the calendar, and you can't embed a UINavigationController inside of another one. There is a calendar view that you can play with, but it's been long enough since I wrote this that I have to have a closer look at the architecture.

I've seen the issue with disappearing UITabBars and I'm going to have to take a closer look.

turbocms commented 9 years ago

@MosheBerman I am currently trying to work on that issue with the disappearing UITabBar myself. In my opinion, it seems like your CalendarViewController is "layering" on top of the TabBar (kind of like a keyboard might "layer" on top of TextFields). I will gladly tell you what I find if find it before you do, Thanks again for all your help.

MosheBerman commented 9 years ago

How are you presenting the calendar view controller? (Also, in Xcode 6, you can see the view hierarchy by clicking the small button above the console. screen shot 2014-10-13 at 4 15 47 am

turbocms commented 9 years ago

Wow!!! This is a great tool!!! A brand new one to me... lol. Let me play with it for a while to see what I can figure out.

Once I do, I will be able to answer your question more accurately but for now, what I can tell you is that I have a TabViewController with 3 bar items. 2 of those bar items display two different NavigationViewControllers that each do a whole bunch of things. For the 3rd bar item, I created a CalendarViewController (I control+dragged from the TabViewController to the CalendarViewController to add that 3rd Tab bar item) and created a class for it in which I copied your code in viewDidLoad:

// 1. Instantiate a CKCalendarViewController
CKCalendarViewController *calendar = [CKCalendarViewController new];

// 2. Optionally, set up the datasource and delegates
[calendar setDelegate:self];
[calendar setDataSource:self];

// 3. Present the calendar
[self presentViewController:calendar animated:YES completion:nil];

When I click that 3rd bar item, I do see your calendar but loose the tab bar.

I will play around with that hierarchy tool you just showed me. I will keep you updated as soon as i find something.

MosheBerman commented 9 years ago

Thanks. I've seen that behavior in the default tab bar template, where tapping the second tab drops the tab bar, but I don't know enough about storyboards or Swift to know if there's some behavioral change to cause the bar to vanish.

turbocms commented 9 years ago

@MosheBerman I just thought I'd give you a quick update. After many attempts to look for a solution as to why I loose the tab bar using CKCalendarViewController, I am sad to say that as of now I have not found one. I decided to change to CKCalendarView. I don't loose the tab bar with CKCalendarView. So as of now, I am implementing it CKCalendarView in my project. Thank for all of your help.

MosheBerman commented 9 years ago

No problem! I'm going to look into that and see if I come up with anything.

MosheBerman commented 9 years ago

It seems the primary issue was solved, so I'm closing this.

MosheBerman commented 9 years ago

What was the issue with linking? I'm running into it myself.

turbocms commented 9 years ago

@MosheBerman In my case, I was including too much in my project. I had to only include the contents of CalendarKit, not MBCalendarKit (which is the parent folder.)

MosheBerman commented 9 years ago

Right, thanks. It looks like various versions of Xcode handle linking differently, and I had to link UIKit, CoreGraphics, and Quartz manually.