Jtapplecalendar: Please add programmatic tutorials and documentations.

Created on 5 Mar 2019  路  12Comments  路  Source: patchthecode/JTAppleCalendar

Tutorial

I noticed that you are providing storyboard tutorial videos for this library, which is great. But for those who code programmatically, a tutorial page only containing storyboard videos is really a nightmare.

At least, I expect fewest lines of code to run this calendar , such as:

let calendar = JTAppleCalendarView(frame: .zero)
calendar.scrollDirection = .horizontal
calendar.calendarDelegate = self
calendar.calendarDataSource = self
calendar.register(MyCell.self, forCellWithReuseIdentifier: "Cell")
self.view.addSubview(calendar)
calendar.translatesAutoresizingMaskIntoConstraints = false
......

Documentation

It's great if there's a complete documentation, if not, users can read public vars and methods in source code. But what can they do if private vars and methods are public too?

    var pathsToReload: Set<IndexPath> = [] //Paths to reload because of prefetched cells
    var anchorDate: Date?
    var lastMonthSize: [AnyHashable:CGFloat] = [:]

Should I use them outside or what?

Version

Latest pod 7.1.7

All 12 comments

Ok. I will do it soon.

Agreed!

It was just easier to do the vids.
And also there's a sample project attached to this library.

But yea... text tutorials would be better i guess..

No - what we mean is tutorials on how to use this library programmatically without the use of storyboards (video or text) @patchthecode :)

@patchthecode When do you think this is possible? :)

OK, i misunderstood the original poster.

I am a storyboard kind of programmer. I am not usually full code. This was the reason why I didnt do one. That being said, many developers have used this library to created programmatic calendars.

I would have to create a programmatic calendar and add it to the example attached here.

one thing however, programatic is the same as the UI. All the functions are the same. And all the classes are the same. Which part in particular are you guys having difficulty with?

I wasn't making a clear point... Here is the thing:

Personally, before deciding to use this library, I expect a tutorial to demonstrate on these questions as much as possible:

  1. How many ways can I create a calendar view, which parameters are required? which optionals?
  2. What are necessary setups? What are optionals?
  3. How do I customize a cell view?
  4. How does this library work with Auto Layout or frame layout? If supports Auto Layout, does it have intrinsic content size or do I have to define both width and height? Further on, do I need to define cell size as well?
  5. This calendar is a subclass of UICollectionView, but what does it extend? what preserve? what change?
  6. What's the common manipulations on the calendar view?
  7. What's the common concerns and issues?

These questions help me understand how this library is designed and whether it fits me. I consider code demo is the best way for this scenario, storyboard, however, is not clearly answering them. (it took me quite a while to figure out some of them, not all of them even now). BTW, youtube videos are not even accessible in some countries. There's actually plenty of UIKit libraries there, most of them are started by simple code demos, some may also give storyboard demos, but few only focus on storyboard demos.

@patchthecode But you're right, using storyboards or coding programmatically is not the real problem, since they are using the same codebase. The real problem is the lacking of code documentation, I mean:

  1. private methods and variables should just be private, not public (Apparently they are all public now, which stops me from reading code directly, and there's no tutorials on code too...)
  2. Documentation on public methods and variables, including simple description, params and return, important note, default value or behaviors. I would recommend all Apple's documentation as example.

In fact, with a good documentation, it doesn't matter that much how well tutorials are! With no documentation, tutorials are the only materials to follow, not bad. With no tutorials on code, a code only programmer has to create this issue. :)

There is an example project provided, literally the source code of the tutorials? Theres hardly any difference from using a storyboard to programatic when using this SDK.

@SeanLintern i agree.. but they still seem stuck for some reason :/

I have tried running the example code, but it does not result in a functioning program. How do I get it to run, so I can evaluate what it does? I tried following the examples from the videos, but all I get in the latest version of Xcode and the latest version is a bunch of errors. It says it cannot find files, and such

I am in the process of doing text documentation.
I didnt do it originally because this library is just a UICollectionView, and many of the functions are the same. The only different ones are mentioned in videos.

@jusher you can try the example project attached to this project.

closing this.
text documentation is in progress @ patchthecode.com

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carlosper88 picture carlosper88  路  4Comments

leo150 picture leo150  路  3Comments

blinkmeoff picture blinkmeoff  路  3Comments

MoridinBG picture MoridinBG  路  5Comments

dbmrq picture dbmrq  路  5Comments