Iam fresher and dont know how to use EGOImageView inside tableviewcell - ios

Scrolling of my tableview is very poor. So i want to use EGOImageView. Any tutorial or any suggestion.?

there are several way to load image smoothly. EGOImageView is one of them . first of use EGOImageView instead of UIImageView and in Nib(Xib) file drag imageview and set Class EGOImageView in identity section (Property toolbar ).
Second easiest way to load image in url Using AFNetworking class.
download This framework AFNetworking and only import
#import "UIImageView+AFNetworking.h"
and set image url like this
[cell.imgUser setImageWithURL:[NSURL URLWithString:data.strprofileimage]];
i think this is helpful to you. thanks

Related

Can't add UIImageView to to the IBOutletCollection

I tried to find the solution, but I couldn't find anyone with the same problem.
I'm using Xcode 8.2.1, writing in Objective-C.
I'm actually having a problem with adding a UIImageView to IBOutletCollection. I'm trying to do it using the Interface Builder.
dragging to connect ImageView with the Collection
I've already deleted any existing outlets of that ImageView.
I'm also adding screenshot of the header file of the MasterViewController - I guess everything is OK here.
declaration of the collection
Thanks for help.
You have to use IBOutletCollection(UIImageView) instead of IBOutletCollection(UIViewController)

Xcode png picture importing and implementation in code

I'm using Xcode (objective-C) with UIKit and SpriteKit.
I imported an image (.png or .jpeg) into my xCode project by "adding a file to (project)" and I put the image in my supporting files.
I think I figured out how to create a UIView in the didMoveToView part of my code in one of my .m files:
CGRect viewRect = CGRectMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame), 100, 100);
UIView* View1 = [[UIView alloc] initWithFrame:viewRect];
but I'm not sure how to attach an image (the .png or .jpeg [doesn't matter] ) to the UIView and display it when the program compiles.
Can someone please tell me how to do this?
Or, if there is a better way to import a picture to Xcode and use it only during the given .m file could someone please tell me how to do this?
Use a UIImage when coding for it, and use that control in the view. You can actually set the image in the design window and not even have to code it one bit.
If you're developing for a Mac, use an NSImage.
If you want to code for it, use an outlet to refer to it, and use actions if you want a user to be able to perform actions with it.
In order to do this (in the newest Xcode), click the button that looks like a Venn Diagram, so that way both your storyboard and your .m file show up. When you want to make an outlet or action, control-click and drag. Don't Command-click, don't option-click, it's control-click. Connect the lines and you'll have a pop-up, and it'll make a function/outlet for you.
Best of luck! :)

How to change UIImageView as background image on parentViewController using swift

I would like to change my UIImageView I used as a background image on my parentViewController after my childView is loaded
in my viewDidLoad, I have this line, that pretty works :
self.parentViewController?.view.addSubview(myBackgroundImage)
I wish to change it while I got an event on app. But when I try again to change it by using the same line as above it doesn't work.
Anyone have a solution ?
I think it is a bad practice to access the view from another controller. I will suggest you to create separate method for this. Or may be just use IBoutlet for this, for example:
self.parentViewController?.myBackgroundImageView.image = UIImage("your_image")

xcode 4 drawing rectangles

i'm very new to xcode. i've googled this and even serched here and i didn't find exactly what i was looking for. i really wanna get this. especially since it's the most basic thing there is.
so, i have the .h and .m files
i want to DRAG a uiview into the .xib file, i don't want it to be as big as the screen, so i resize it.
now i want to draw a bunch of rectangles INSIDE this view object.
how do i go about doing this?
your help would be greatly appreciated!
So you add a generic UIView then create a subclass of UIView and do your drawing inside the drawRect method.
Then change the class of the UIView to your subclass name in the inspector.
Be sure to #include your header in the app delegate.
That's the basic thing.
For more sophistication, you're going to want to learn to use UIViewController subclasses as well. These are used all over ios.

OBShapedButton class in Storyboard

I am trying to implement the OBShapedButton class in my iOS project so I can create irregular shaped buttons defined by png files. This is a link for more information on OBShapedButton.
Basically this class works great when I'm using it with my nib files. However I prefer using storyboard in my projects. But when I try to do the same thing in storyboard, following all the same steps for making an irregular button as I do in my nib files, it doesn't work and the clickable area is still defined by a rectangle and not my png image.
My question is how would I go about using storyboard with OBShapedButton? Is there something I am missing about storyboard that would prevent OBShapedButton from working?
I'm using it in a project with Storyboards. Be sure the set the Custom Class in the Identity inspector to OBShapedButton, I don't think I did anything else special.

Resources