Giter Site home page Giter Site logo

Calendar Grid is not fully 0,0 when set to 0,0 Cell inset. It is off by one pixel when orientation changes. This seems to be an iOS issue. Workaround for now is to set the inset to some negative fractional value if you are experiencing the issue. about jtapplecalendar HOT 33 CLOSED

patchthecode avatar patchthecode commented on May 2, 2024
Calendar Grid is not fully 0,0 when set to 0,0 Cell inset. It is off by one pixel when orientation changes. This seems to be an iOS issue. Workaround for now is to set the inset to some negative fractional value if you are experiencing the issue.

from jtapplecalendar.

Comments (33)

patchthecode avatar patchthecode commented on May 2, 2024 1

Understood. Hmm. Alright then i'll have to debug this on my end. In the mean time, try setting the inset to (-0.5, -0.5) or (-1, -1) as a work around (you can choose what ever number you like). Will get back to you.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

OK. first thing. I update this calendar quite a bit. Which version are you using?

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

Using JTAppleCalendar (3.0.0) // From pod install output

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Note the latest version is 3.0.1
Can you do an update and let me know if it is fixed?

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

It is fixed!

Thank you!

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

And leave a like! :) its much needed. thanks!

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

Happy to do so (and did!)

Chuck

p.s. do I need to do anything special to support a touch or 3d touch?
Should I add that to the cell and the cell's controller?

love the cocoapod!

On Tue, May 24, 2016 at 1:13 PM, JTAppleCalendar [email protected]
wrote:

Hey mind putting that image of you calendar here?
I would really appreciate it. This is a new project and people needs to
see what can be done with it.
Can you post that image here? --> #2
#2
Wont bug you anymore if you do :]


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#26 (comment)

Chuck

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Touch and 3d touch? heh.. i dont even have an iPhone6 :(
I have not looked into 3d touch, but now that you mentioned it, i'll look into it in a bit. Well.. more like a bit bit.

And glad you enjoyed the pod. The others here on github was giving me a headache

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

FYI a cellInset of 0,0 still gives sketchy results on the grid display.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

taking a look

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

It looks fine on mines

  1. Are you free scrolling? or paged scrolling?
  2. What happens with inset 0,0?

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Ok i think i see something. It still leaves a space. It is a line that is off by one pixel.
Is this what you area talking about?

Fixing this issue now. It happens when i do an orientation change.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Hmm.. on second thought. I cant tell if it is an error without looking to see if it is on a real device. The line space disappears when i zoom in the iOS simulator by pressing the CMD + 1 or CMD + 2 or CMD + 3 keys. You will have to tell me specifically what you are seeing. Looking into it further

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

default scrolling (so paged?)

inset 0,0 gives results similar to the first image in the original issue.

On Tue, May 24, 2016 at 1:49 PM, JTAppleCalendar [email protected]
wrote:

It looks fine on mines

  1. Are you free scrolling? or paged scrolling?
  2. What happens with inset 0,0?


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#26 (comment)

Chuck

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

Could be. I know that only some of the lines show when the inset is 0,0. My
app is portrait only so there is no orientation change.

On Tue, May 24, 2016 at 2:03 PM, JTAppleCalendar [email protected]
wrote:

Ok i think i see something. It still leaves a space. It is a line that is
off by one pixel.
Is this what you area talking about?

Fixing this issue now. It happens when i do an orientation change.


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#26 (comment)

Chuck

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

When inset is 0, 0, this is what I see:

[image: Inline image 1]

Different lines are missing when I scroll the calendar, but the same lines
are missing on each month when I scroll back and forth.

On Tue, May 24, 2016 at 2:07 PM, JTAppleCalendar [email protected]
wrote:

Hmm.. on second thought. I cant tell if it is an error without looking to
see if it is on a real device. The line space disappears when i zoom in the
iOS simulator by pressing the CMD + 1 or CMD + 2 or CMD + 3 keys. You will
have to tell me specifically what you are seeing. Looking into it further


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#26 (comment)

Chuck

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

not seeing the image. its not showing on github. But i think i get it. Similar issue? Alright. Will look into this

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Tell you what. Set the inset to -1, -1 as a work around. I'll have to look into this after dinner

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

screenshot 2016-05-24 14 12 08

just for completeness, here's the screenshot.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Ok, i have found fixed this issue and pushed it to github.
I have not released it in 3.0.2 yet just in case there is something else wrong with it (i dont think there should be though, i tested it much). Are you able to take a pull of master branch to see if it works for you?

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

I know how to pull the master branch, but not sure what I need to do to
replace the pod with what I pull (I'm a seasoned programmer but still
somewhat new to Xcode, iOS, cocoa pods, etc.)

On Tue, May 24, 2016 at 7:50 PM, JTAppleCalendar [email protected]
wrote:

Ok, i have found fixed this issue and pushed it to github.
I have not released it in 3.0.2 yet just in case there is something else
wrong with it (i dont think there should be though, i tested it much). Are
you able to take a pull of master branch to see if it works for you?


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#26 (comment)

Chuck

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

I understand.
Ok, hmm.. i'm working on another upgrade you see. So i dont want to release another one yet. So here's what,

do a clone of this repository --> https://github.com/patchthecode/JTAppleCalendar.git
Next, just exchange these 3 files in your local cocoa pod folder, with these 3 files in the repository that you just cloned

The file names are:

  1. JTAppleCalendarDelegate.swift
  2. JTAppleCalendarFlowLayout.swift
  3. JTAppleDayCell.swift

Once you replace these 3 files, you should now have the fix.
When I do the official release next week, you can just do your regular pod install command.

Let me know if the fix worked.

from jtapplecalendar.

cbwilliamsnh avatar cbwilliamsnh commented on May 2, 2024

Thanks!

I'm working on another (unrelated) issue. As soon as that's solved I'll
give this a try.

Chuck

On Tue, May 24, 2016 at 8:03 PM, JTAppleCalendar [email protected]
wrote:

I understand.
Ok, hmm.. i'm working on another upgrade you see. So i dont want to
release another one yet. So here's what,

do a clone of this repository -->
https://github.com/patchthecode/JTAppleCalendar.git
Next, just exchange these 3 files in your local cocoa pod folder, with
these 3 files in the repository that you just cloned

The file names are:

  1. JTAppleCalendarDelegate.swift
  2. JTAppleCalendarFlowLayout.swift
  3. JTAppleDayCell.swift

Once you replace these 3 files, you should now have the fix.
When I do the official release next week, you can just do your regular pod
install command.

Let me know if the fix worked.


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#26 (comment)

Chuck

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Should be fixed in version 4.0.0

from jtapplecalendar.

hanishassim avatar hanishassim commented on May 2, 2024

I'm having the same problem too, I'm on the 4.0.3
simulator screen shot 23 jun 2016 1 21 12 am
You can see there is like a gap there. Note that I've placed the imageview cell and set constraint 0 on all sides, and content mode fill

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

@hanishassim is it possible you can give me a copy of your .xib file?
You can drag your file and drop it straight into a conversation box on github here. If that is possible for you.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Hmm. It seems ok there. Would it be possible if i could see the bugged project? Or is it private?

from jtapplecalendar.

hanishassim avatar hanishassim commented on May 2, 2024

Could you share the screenshot? Sorry but I can't share the project..

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Ok. I just setup the calendar.
And mine is working properly.
So some questions about your calendar:

  1. I see you December 2006 is being over lapped by the the black view. Are you doing anything extra in your configuration?
  2. Also, i see in your xib, you're using UIImageViews instead of UIViews. Is every thing ok here?
  3. Does this issue happen to the sample calendar project attached here on github?

from jtapplecalendar.

hanishassim avatar hanishassim commented on May 2, 2024
  1. I removed it, instead using the header for section xib now, no extra config used.
  2. I'm using imagviews cause I want to apply calendar like airbnb's, they have date which is not selected, but set as blocked (not available for booking). Is still selectable if want to unbock it (which will remove the image view) .. Hmm is it okay to use the imageviews?
  3. It does not happen in the sample cause the selectedView is round and not filling till the edges, so can't see if there is gap or not.

Attached is what I'm trying to achieve, like aribnb:
iphone 6 plus copy 2

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Alright then, so in order for me the recreate the (0,0) error it seems i have to create a selected background view that is not circular in shape. I will do as you did and use a UIImageView and fill the cell to see if i can recreate it.

And btw, you can use any view on your calendar. So long as it can be dragged unto the canvas, it can be used.

I will now attempt to recreate your pixel error.

from jtapplecalendar.

hanishassim avatar hanishassim commented on May 2, 2024

thanks noted.

from jtapplecalendar.

patchthecode avatar patchthecode commented on May 2, 2024

Closed.
Changed behavior of calendar.

if cellInset.x == 0 { cellInset.x = -0.1 }
if cellInset.y == 0 { cellInset.y = -0.1 }

from jtapplecalendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.