Code Monkey home page Code Monkey logo

fximageview's People

Contributors

drekka avatar nicklockwood avatar nikalra avatar orangewise 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  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

fximageview's Issues

FXImageView processImage SIGABRT

Crashlytics bug report...

10com.apple.root.default-priority Crashed
0 ... libsystem_kernel.dylib pthread_kill + 8
5 libsystem_c.dylib szone_free + 2050
6 CoreFoundation CFAllocatorDeallocate + 122
7 CFNetwork HTTPMessage::ensureParserFinished() + 46
8 CFNetwork HTTPMessage::copyHeaderFieldValue(unsigned int) + 12
9 CFNetwork URLResponse::getMIMEType() + 68
10 CFNetwork URLConnectionClient::clientDidReceiveResponse(CFURLResponse, URLConnectionClient::ClientConnectionEventQueue) + 206
11 CFNetwork URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>, long) + 442
12 CFNetwork URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>
, long) + 668
13 CFNetwork URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 668
14 CFNetwork URLConnectionClient::processEvents() + 106
15 CFNetwork MultiplexerSource::perform() + 156
16 ... CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 14
21 CFNetwork CFURLConnectionSendSynchronousRequest + 346
22 Foundation +[NSURLConnection sendSynchronousRequest:returningResponse:error:] + 248
23 MyApp
FXImageView.m line 315
-[FXImageView processImage]
24 MyApp
FXImageView.m line 64
-[FXImageOperation main]
25 Foundation -[__NSOperationInternal start] + 862
26 Foundation __block_global_6 + 102
27 ... libdispatch.dylib _dispatch_call_block_and_release + 12
29 libsystem_c.dylib _pthread_wqthread + 294

How to download ones for two different FXImageView with the same image

Hi, in every cell of my TableView I want to put the same image as the background and a thumbnail on the left. So I created two FXImageView but of course the application is downloading every time two times the same image, how can I make it download only ones but use the same downloaded image for both FXImageView?
Thanks!!

UI related task processing on Background thread

I am receiving this in error log when using asynchronous = YES

Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 7206, TID: 258580, Thread name: (none), Queue name: NSOperationQueue 0x60000022e280 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4   FXImageView                         0x00000001074dab67 -[FXImageView cacheKey] + 215
5   FXImageView                         0x00000001074db1f4 -[FXImageView processImage] + 52
6   FXImageView                         0x00000001074d9e7f -[FXImageOperation main] + 63
7   Foundation                          0x0000000109b51cd6 -[__NSOperationInternal _start:] + 778
8   libdispatch.dylib                   0x000000010d37043c _dispatch_client_callout + 8
9   libdispatch.dylib                   0x000000010d375af4 _dispatch_block_invoke_direct + 592
10  libdispatch.dylib                   0x000000010d37043c _dispatch_client_callout + 8
11  libdispatch.dylib                   0x000000010d375af4 _dispatch_block_invoke_direct + 592
12  libdispatch.dylib                   0x000000010d375884 dispatch_block_perform + 109
13  Foundation                          0x0000000109b4dce4 __NSOQSchedule_f + 342
14  libdispatch.dylib                   0x000000010d37043c _dispatch_client_callout + 8
15  libdispatch.dylib                   0x000000010d376856 _dispatch_continuation_pop + 967
16  libdispatch.dylib                   0x000000010d374c86 _dispatch_async_redirect_invoke + 780
17  libdispatch.dylib                   0x000000010d37c1f9 _dispatch_root_queue_drain + 772
18  libdispatch.dylib                   0x000000010d37be97 _dispatch_worker_thread3 + 132
19  libsystem_pthread.dylib             0x000000010d82c5a2 _pthread_wqthread + 1299
20  libsystem_pthread.dylib             0x000000010d82c07d start_wqthread + 13
2017-10-11 14:50:12.061475+0500 Asma-ul-Husna[7206:258580] [reports] Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 7206, TID: 258580, Thread name: (none), Queue name: NSOperationQueue 0x60000022e280 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4   FXImageView                         0x00000001074dab67 -[FXImageView cacheKey] + 215
5   FXImageView                         0x00000001074db1f4 -[FXImageView processImage] + 52
6   FXImageView                         0x00000001074d9e7f -[FXImageOperation main] + 63
7   Foundation                          0x0000000109b51cd6 -[__NSOperationInternal _start:] + 778
8   libdispatch.dylib                   0x000000010d37043c _dispatch_client_callout + 8
9   libdispatch.dylib                   0x000000010d375af4 _dispatch_block_invoke_direct + 592
10  libdispatch.dylib                   0x000000010d37043c _dispatch_client_callout + 8
11  libdispatch.dylib                   0x000000010d375af4 _dispatch_block_invoke_direct + 592
12  libdispatch.dylib                   0x000000010d375884 dispatch_block_perform + 109
13  Foundation                          0x0000000109b4dce4 __NSOQSchedule_f + 342
14  libdispatch.dylib                   0x000000010d37043c _dispatch_client_callout + 8
15  libdispatch.dylib                   0x000000010d376856 _dispatch_continuation_pop + 967
16  libdispatch.dylib                   0x000000010d374c86 _dispatch_async_redirect_invoke + 780
17  libdispatch.dylib                   0x000000010d37c1f9 _dispatch_root_queue_drain + 772
18  libdispatch.dylib                   0x000000010d37be97 _dispatch_worker_thread3 + 132
19  libsystem_pthread.dylib             0x000000010d82c5a2 _pthread_wqthread + 1299
20  libsystem_pthread.dylib             0x000000010d82c07d start_wqthread + 13

Although the images renders well but need to get rid from these thread related errors.

Image disappears on UICollectionViewCell

On a UICollectionViewCell if a cell is selected the image is removed on click

im adding the image this way

FXImageView * imagem = (id)[cell viewWithTag:6];
if(!imagem)
{
imagem = [FXImageView new];
imagem.tag = 6;
imagem.asynchronous = YES;
[cell addSubview:imagem];
}

[imagem setImageWithContentsOfURL:[NSURL URLWithString:@"some url"]]];

Image disappears

Image disappears when UIActivityViewController is called on screen in iOS 11. Changing it to a UIImageView does not disappear.

Operation dependency

Hi,

In the .m file, why are older operations being added a dependent of the newer operation when the queue is greater than the maxConcurrentQueue?

Thanks!

Feedback if image download fails for any reason

Hi,

If the connection is down or there is an error while downloading the image, is there any way of being notified?
I also noticed that in this case the item views placeholders just disappear.

Thanks in advance.

FXImageView doesn't play gif image

Hi,

I am trying to use FXImageView with a gif loading image, the FXImageView itself is a view for the iCarousel. However even though a normal UIIMageView can play gif animated images, the FXImageView doesn't play the animation and only displays a static image!

The code I am using is as follows:

NSString *filePath = [[NSBundle mainBundle] pathForResource: @"loadingImage" ofType: @"gif"];
        NSData *gifData = [NSData dataWithContentsOfFile: filePath];
        UIImage *loadingImage = [UIImage animatedImageWithAnimatedGIFData:gifData];
        fximageView = loadingImage;

Canceling async image download

Hi,

Do I need to cancel outstanding async downloads when the FXImageView is no longer needed, hence will be deallocated by ARC?

Fixed Warning in UIImage+FX.m - Line 400 -Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapInfo' (aka 'enum CGBitmapInfo')

In Xcode GM Seed - Version 5.0 (5A1412)

Receive the warning above in subject line.

-Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapInfo' (aka 'enum CGBitmapInfo')

Here's the simple fix (cast):

CGContextRef context = CGBitmapContextCreate(data, width, height, 8, bytesPerRow, NULL, (CGBitmapInfo)kCGImageAlphaOnly);

Sorry, I'm not good at fixing and contributing code back to GitHub yet :)

Thanks,
Adam

Image changed at server does not update in imageView

I am useing FXImageView. I load Image by passing the URL of the Image but the problem is that if Image at the server changes, it does not reflect in change in image in image view. It still showing old image. I think it might be caching image and showing local one without taking updated image from server.

What I should do get updated image from server or how should i remove the cache of the current image?

My Code Below:
self.userPhotoImageView.asynchronous = YES;
self.userPhotoImageView.contentMode = UIViewContentModeScaleAspectFit;
NSString *imagePath = //constant image url path to server
NSURL *imageURL = [NSURL URLWithString:imagePath];
[self.userPhotoImageView setImageWithContentsOfURL:imageURL];

updating an image property doesn't force a redraw

I am trying to utilize a custom effect drawing block, but only when the item is 'selected'. My custom block is 'applyGroup'. This is the 'setSelected' method in my class, which I would expect to toggle in and out the applyGroup appropriately. However, it doesn't work. In all cases, the image draws without the custom block.

- (void)setSelected:(BOOL)value {
    selected = value;
    self.customEffectsBlock = (selected) ? applyGroup : nil;
    [self setNeedsDisplay];
}

The only way I can get it to use a custom block is if I adjust the cacheKey. It appears you have deprecated the customEffectsIdentifier, which would have triggered a redraw.

Is the cacheKey the only way to do this now? Should I be pursuing a different method of adjusting my drawing based on a class property?
Thanks,

Private image view doesn't scale

Hi,

the private image view doesn't scale if the size of the FXImageView changes.
This would fix the problem:

FXImageView.m:126

_imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_imageView.contentMode = UIViewContentModeScaleAspectFit;

Crash in cacheKey method

Hi,
I'm getting occasional crash reports from the cacheKey method in FXImageView... Anyone has an idea how to resolve?? See crash report below..

1 libsystem_platform.dylib _OSAtomicCompareAndSwap32Barrier + 14
2 libobjc.A.dylib lookUpImpOrForward + 75
3 libobjc.A.dylib _class_lookupMethodAndLoadCache3 + 35
4 libobjc.A.dylib _objc_msgSend_uncached + 25
5 Foundation __NSDescriptionWithLocaleFunc + 53
6 CoreFoundation __CFStringAppendFormatCore + 5623
7 CoreFoundation __CFStringCreateWithFormatAndArgumentsAux + 77
8 Foundation -[NSPlaceholderString initWithFormat:locale:arguments:] + 131
9 Foundation +[NSString stringWithFormat:] + 61
10 APPNAME -FXImageView cacheKey
11 APPNAME -FXImageView processImage
12 APPNAME -FXImageOperation main
13 Foundation -[__NSOperationInternal _start:] + 773

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.