Coder Social home page Coder Social logo

multirowcalloutannotationview's People

Contributors

grgcombs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multirowcalloutannotationview's Issues

Arrow not always drawn correctly

This is something I discovered in the code from asynchrony.com that you based yours off of. I've been trying to fix it with no success so far, so I went looking to see if there were other good alternatives. It turns out yours does the same thing:

  • tap the map to close the annotation
  • scroll the map so the pin is right at the right-hand edge of the screen
  • tap the pin to bring up the annotation

There is no arrow pointing to the pin, but there is a small line jutting out from the lower right corner of the annotation. I believe this is an artifact of the arrow being drawn incorrectly, because if you now dismiss and recall the annotation, the arrow is present and the line is gone.

If you do the same thing and move the pin to the left edge of the screen, the arrow is drawn but it's in the wrong place. Something about the view being moved so that the whole annotation will display is causing this, but so far I have not been able to fix it. Suggestions welcome!

MultiRowCalloutAnnotationView hidding

When MultiRowCalloutAnnotationView is shown and you tap second or third time on calloutAccesory, AnnotationView hide and show once again. I think the problem is with selectors pefromed with delays in hitTest method, when you tap buttons less frequently it works just fine.

Edit: I figure it out :

[self preventParentSelectionChange]; [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(allowParentSelectionChange) object:nil]; [self performSelector:@selector(allowParentSelectionChange) withObject:nil afterDelay:1.0];

ios 8 crash on tapping overlay

2014-11-19 15:34:07.454 CalloutDemo[1622:60b] Representative (Rep. Dude) with ID 'TXL1' was tapped.
2014-11-19 15:34:09.638 CalloutDemo[1622:60b] Representative (Rep. Guy) with ID 'TXL2' was tapped.

Hit the background ->
2014-11-19 15:34:10.674 CalloutDemo[1622:60b] -[__NSSetM coordinate]: unrecognized selector sent to instance 0xbeafdc0
(lldb)

Invalid Coordinate crash

Hi,

Occasionally I get a crash when the map is moved and the map centre is being re positioned.

with the crash notice

Invalid Coordinate -212.53626430, +486.04761195

Causing the following backtrace

2 CoreFoundation 0x31cf87d3 __handleUncaughtException + 238
3 libobjc.A.dylib 0x34e3606b _objc_terminate + 102
4 libstdc++.6.dylib 0x3442be3d _ZN10__cxxabiv111__terminateEPFvvE + 52
5 libstdc++.6.dylib 0x3442be91 _ZSt9terminatev + 16
6 libstdc++.6.dylib 0x3442bf61 __cxa_throw + 84
7 libobjc.A.dylib 0x34e34c8b objc_exception_throw + 70
8 CoreFoundation 0x31cf83cd -[NSException dealloc] + 0
9 MapKit 0x34781fe3 -[MKMapView setCenterCoordinate:animated:] + 230
10 odpn 0x00072ae1 -MultiRowCalloutAnnotationView adjustMapRegionIfNeeded
11 odpn 0x00071f8f -MultiRowCalloutAnnotationView didMoveToSuperview
12 UIKit 0x3726c377 -[UIView(Hierarchy) _postMovedFromSuperview:] + 178
13 UIKit 0x372605d7 -[UIView(Hierarchy) removeFromSuperview] + 334
14 MapKit 0x347665c1 -[MKAnnotationContainerView _removeAnnotationView:updateCollections:] + 240
15 MapKit 0x347664c9 -[MKAnnotationContainerView _removeAnnotationView:] + 16
16 MapKit 0x34766243 -[MKAnnotationContainerView removeAnnotation:] + 234
17 MapKit 0x34779517 -[MKMapView removeAnnotation:] + 30

This is the code near 468

//Calculate new center point, if needed
if (xPixelShift || yPixelShift) {
CGFloat pixelsPerDegreeLongitude = self.mapView.frame.size.width / self.mapView.region.span.longitudeDelta;
CGFloat pixelsPerDegreeLatitude = self.mapView.frame.size.height / self.mapView.region.span.latitudeDelta;

    CLLocationDegrees longitudinalShift = -(xPixelShift / pixelsPerDegreeLongitude);
    CLLocationDegrees latitudinalShift = yPixelShift / pixelsPerDegreeLatitude;

    CLLocationCoordinate2D newCenterCoordinate = {self.mapView.region.center.latitude + latitudinalShift, self.mapView.region.center.longitude + longitudinalShift};

    [self.mapView setCenterCoordinate:newCenterCoordinate animated:YES];

    //fix for now next line 468
    self.frame = CGRectMake(self.frame.origin.x - xPixelShift, self.frame.origin.y - yPixelShift, self.frame.size.width, self.frame.size.height);
    //fix for later (after zoom or other action that resets the frame)
    self.centerOffset = CGPointMake(self.centerOffset.x - xPixelShift, self.centerOffset.y);
}

I'm looking to see if there is a way to over come this.

thanks

Kyle

Problem with popup

I changed the code in District.m file.

  • (District *)demoAnnotationFactory {
    Representative *dudeOne = [Representative representativeWithName:@"Rep. Dude" party:@"Republican" image:[UIImage imageNamed:@"redstar"] representativeID:@"TXL1"];
    Representative *dudeTwo = [Representative representativeWithName:@"Rep. Guy" party:@"Democrat" image:[UIImage imageNamed:@"bluestar"] representativeID:@"TXL2"];
    Representative *dudeT = [Representative representativeWithName:@"Test" party:@"Democrat" image:[UIImage imageNamed:@"bluestar"] representativeID:@"TXL2"];
    return [District districtWithCoordinate:CLLocationCoordinate2DMake(30.274722, -97.740556) title:@"Austin Representatives" representatives:[NSArray arrayWithObjects:dudeOne, dudeTwo, dudeT, nil]];
    }

  • (District *)demoAnnotationFactory1 {

    Representative *lol = [Representative representativeWithName:@"Rep. Dude" party:@"Republican" image:[UIImage imageNamed:@"redstar"] representativeID:@"TXL1"];
    Representative *tdo = [Representative representativeWithName:@"Test" party:@"Democrat" image:[UIImage imageNamed:@"bluestar"] representativeID:@"TXL2"];
    return [District districtWithCoordinate:CLLocationCoordinate2DMake(20.274722, -97.740560) title:@"Test Representatives" representatives:[NSArray arrayWithObjects:lol, tdo, nil]];
    }

when I am testing the popup. I have found a error. As you see, I have clicked this (demoAnnotationFactory) so there are 3 datas can I Find. when I clicked this (demoAnnotationFactory1) Can i find also 3 datas. but there are 2 datas as usually. The last one shouldn't have come in the factory1. that one is own to demoAnnotationFactory.

I will hope you could correct this. You can change this according to delete the old datas. when we clicked the popups we need to have new datas.

otherwise i truly to say this as a wonderful tutorial.

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.